Can't draw thin lines with Java2D
问题 I'm trying to draw a polygon with a stroke of 1 pixel. Because the entire polygon is scaled by 100, I set the line width to 0.01. For some reason though, the polygon gets drawn with an on-screen line width of what looks to be 100 pixels instead of 1. I'm using GeneralPath as the polygon shape. Thin lines do get drawn if I use the same approach for drawing Line2D shapes. g2d.scale(100, 100); g2d.setStroke(new BasicStroke(0.01f)); g2d.draw(theShape); New info: If I remove the setStroke line I