GraphicsContext will use the current transform for the locations of the points when it renders a polygon or polyline, but it will not apply that transform to the rendering attributes like the stroke and the paint (mainly the location of the endpoints of the gradients).
The two figures in the attached test case should look identical, but the first one (without the workaround) has a thinner stroke width and the gradient repeats several times through its bounds rather than covering the bounds in a single pass.
The two figures in the attached test case should look identical, but the first one (without the workaround) has a thinner stroke width and the gradient repeats several times through its bounds rather than covering the bounds in a single pass.
- duplicates
-
JDK-8096603 [Canvas] GraphicsContext set transform not working as expected
- Closed