[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
Jim Graham
james.graham at oracle.com
Wed Dec 8 22:49:29 UTC 2010
By "without this optimization" do you mean back when you did a full scan
for the proper T? Then this is great news!
How often do we end up needing getTCloseTo in practice?
...jim
On 12/8/2010 1:54 PM, Denis Lila wrote:
> Hi Jim.
>
>>> How about "if the 3 segments of the control polygon are all close to
>>> each other in length and angle", then the optimization applies. Is
>>> that easy to test?
>>
>> Hmm, that would actually be extremely easy to test and it would cost
>> almost nothing. We already compute the control polygon lengths in onLeaf, and
>> we're already assuming that every leaf is "flat enough", so we
>> probably don't even need to check the angles. Comparing lengths should be good
>> enough.
>> I'll try this out.
>
> I implemented this and updated the webrev. I tested on a few curves with very high
> and very low accelerations. The results were identical to what I used to get
> without this optimization. When the curve has no acceleration, all calls of getTCloseTo
> are skipped.
>
> Regards,
> Denis.
More information about the 2d-dev
mailing list