[OpenJDK 2D-Dev] Different rounding applied by ProcessPath and ShapeSpanIterator
linuxhippy at gmail.com
Sun Sep 25 11:33:05 UTC 2016
I recently tried to track down JDK-8156100 (xrender: Subpixel drawing
bug in Java 8) - under some circumstances paths do not align with
fills when subpixel coordinates are used.
The issue seems to be caused by ProcessPath and ShapeSpanIterator
behaving differently with regards to rounding.
I've created a small testcase to illustrate the issue:
http://pastebin.com/hy5zCkPR - where a rectangle with subpixel
coordinates is "drawn" with bothl, SSI and ProcessPath.
The ShapeSpanIterator seems to truncate any subpixel values, whereas
ProcessPath always seems to "round up".
Is this expected behaviour? Should I avoid SSI and switch to
Thank you in advance, Clemens
More information about the 2d-dev