Hello.
Please review the fix for jdk9.
This is bug which was found when the fractional scale is used in Swing.
The problem is that if we save a usrClip as Rectangle2D then we
incorrectly intersect it with device clip. The problem is in the
RectangularShape.getBounds() method, see more details:
http://mail.openjdk.java.net/pipermail/2d-dev/2016-July/007299.html
So getBounds() produces the bigger Rectangle than is necessary and our
clip became bigger as well. This means that in some fractional scales
such clips are overlapping.
The test will test fillRect, DrawImage, DrawLine methods and validates
that there are no any overlapping if we set the clip.(The gaps between
touched pixels are allowed only for lines).
Note that as I understand the code this fix should affect the DrawLines,
because in some situations it is possible that two lines are overlapped
without clip. And two other cases(fillRect, drawImage) should work
without clip, but only fillRect works. It is discussed here:
http://mail.openjdk.java.net/pipermail/2d-dev/2016-October/007766.html
Bug: https://bugs.openjdk.java.net/browse/JDK-8167310
Webrev can be found at: http://cr.openjdk.java.net/~serb/8167310/webrev.00
--
Best regards, Sergey.