The BasicStroke.createStrokedShape() is the intended method to test for
intersection with the stroked shape as you implemented in your later
example. Note that the default graphics setting for the STROKE_CONTROL
hint is STROKE_NORMALIZE which allows tweaking of lines for aesthetic
purposes which may not exactly match the output of createStrokedShape().
If you render with STROKE_PURE for that hint then the output should be
much closer. On the other hand, your UI may not really be affected by
an off-by-1 error caused by the normalization procedures so this may be
a moot point...
...jim
===========================================================================
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".