[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces

Denis Lila dlila at redhat.com
Mon Dec 13 18:54:11 UTC 2010

Hi Jim.

> With respect to finding a cubic root, currently you are doing that in
> 2 dimensions, but what if we converted to 1 dimension?
> Consider that the control polygon is "fairly linear".  What if we 
> rotated our perspective so that it was horizontal and then squashed it
> flat?  Consider instead a 1 dimensional bezier with control values
> of:
> (where |mn| is the length of the m->n control polygon of the original
> curve - sum of all segments from point m to point n)
> 0.0, |01|, |02|, |03|

I had thought of something like this but I was afraid that the loss of
Curve.java:141-152 would hurt accuracy. I implemented this though, and
testing shows that that's not a problem. This should also double the
performance of the computation since we only run one cubic root finder,
and that was the major bottleneck.
I updated the webrev.

Should I remove some no longer needed methods, like getTCloseTo?

> Solve that 1 dimensional bezier for v=(leaflen*polylen)/linelen...

Don't you mean (targetLength - lenAtLastT) * polylen / leaflen?


More information about the 2d-dev mailing list