Reverse Java Graphics2D scaled and rotated coordinates

If you keep a copy of the AffineTransform you use when you paint the image, you can use AffineTransform.inverseTransform(Point2D ptSrc, Point2D ptDst) to transform a device space coordinate back to user space Edit: If you capture the current transform of the Graphics2D while painting, beware of the Graphics2D being re-used for multiple lightweight children of … Read more