I’m doing zooming using a call to AffineTransform::scaled(), and then calling setTransform on the object I want to scale. The object is drawn by a simple g.drawRect() call, where the Rectangle comes from g.getClipBounds();
For the most part, this is working swimmingly. What I am seeing is the thickening and thinning of lines that comes from boundary alignment issues. The same object, at different zoom levels can look like this, e.g.:
I’m sure the issues are the result of how the vertical lines fall on pixel boundaries, but I would have expected drawing to get better as the rectangles got larger, and the lines covered more pixels. What’s the proper technique for avoiding this kind of drawing problem?