[OpenJDK 2D-Dev] strange behaviour with Area.substract

Geronimo Ma. Hernandez geronimo013 at gmx.com
Mon Mar 19 07:50:16 UTC 2012


Hello,

I realized a strange behavior setting up a compound shape. I reduced my app to 
a small test-case, which I added. I also added a picture to visualize what 
happens.
The jar is executable and I tested it with jdk 1.6.0_30 and jdk 1.7.0_03

The lines of interest are from method reCalcShape() of class FailedShape
In this method a GeneralPath is assembled and a part of a circle should get 
subtracted from the GeneralPath.

I added a boolean "avoidFailure" to switch between strange behavior and normal 
operation. 

The difference between both test-cases is the point, *when* the circle is 
created.

In my code, there's no transformation, but it looks like whether changing the 
coordinate of a Point creates a transformation. This is not desired, so I'd 
like to know, whether the strange behavior is some lack of understanding or 
whether it might be a bug.


kind regards

Gero
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Java2DFailure.png
Type: image/png
Size: 7448 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20120319/a8b31d00/Java2DFailure.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Java2DFailure.jar
Type: application/zip
Size: 13538 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20120319/a8b31d00/Java2DFailure.jar>


More information about the 2d-dev mailing list