[OpenJDK 2D-Dev] [PATCH] Fix BasicStroke's usage of dash elements
Jennifer.Godinez at Sun.COM
Tue Jan 13 19:48:39 UTC 2009
Thanks for submitting the patch. Please confirm that you have already signed the Sun Contributor
Agreement (SCA). See "Become a contributor" in http://openjdk.java.net/contribute/.
Until that time, we will put this patch on hold.
Omair Majid wrote:
> The Java Tutorials  say this about the dash_array parameter of
> The dash array defines the dash pattern. Alternating elements in the
> array represent the dash length and the length of the space between
> dashes in user coordinate units. Element 0 represents the first dash,
> element 1 the first space, and so on.
> However, in openjdk6 (and openjdk7 - I havent tested explicitly, just
> looked at the code) it seems to be the other way around: element 0
> represent the first space and element 1 the first dash (and so on). The
> attached program, when run with openjdk6, produces a solid black border
> around the button text instead of no border.
> The attached patch tries to fix the problem by initializing the renderer
> with dashOn = true so that the first element of the array produces a
> dash. The second element then produces a space and so on.
>  http://java.sun.com/docs/books/tutorial/2d/geometry/strokeandfill.html
More information about the 2d-dev