Since the 2f stroke straddles the path it only contributes 1f on every side so the 96pixel ellipse should be 98 pixels.

It should be reliable on all platforms, but there may be +/- half a pixel slop depending on rounding directions, stroke normalization hints and algorithm choices.

Yes, translucency does ruin the "drawing shapes on top of each other" approach. At that point the only choices are to let the background leak through or use a downsampling approach in place of the built-in AA.

BTW, have you tried setting the STROKE_PURE hint? That may at least make the gaps a little more symmetric than the default STROKE_NORMALIZE hint...

                        ...jim

davood wrote:
Thanks for your helps.
The problem with drawing the border is that it will make the size of shape
bigger than what it actually is, specially if I use stroke 2f. Can I be sure
that if I draw a say 96pixel ellipse and a 2f stroke around it, it will take
100pixel on all platforms?
On other side the shapes will be translucent so its not possible to just
draw shapes on top of each other. Beside that I need to measure shapes area
and there will be user interactions, It's why I'm trying to find a solution
having the exact shape.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to