[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
Jim Graham
james.graham at oracle.com
Wed Oct 20 17:14:13 UTC 2010
Hi Denis,
One clarification:
On 10/20/10 7:11 AM, Denis Lila wrote:
>> When would the isCW test trigger? Does it track "rev"? What happens
>> at 180 degrees (is that test reliable for the randomization that might
>> happen when omxy are directly opposite mxy)?
>
> isCw is used for computing the arc bisector by testing whether the computed
> point is on the side it should be (and multiplying by -1 if not), it is used
> to compute the sign of cv in drawBezApproxForArc, and for computing rev.
>
>> The only reason I ask is
>> because I think the sign of mmxy is probably controllable by
>> understanding the input conditions, but this test should be safe
>> (modulo if it really works at 180 degrees). If it has failure modes at 180
>> degrees then reworking the math to produce the right sign in the first
>> place may be more robust for that case. A test for this is to render
>> "(0,0) -> (100,0) -> (0,0)" with round caps and then rotate it through
>> 360 degrees and see if the round caps invert at various angles.
>
> I already did that. I drew 100 lines like the one you describe. I attached
> the results. It never fails. It is still possible that there could be some
> case where it fails, but this does prove that such a case would be very rare.
>
>> Also, line 256 - does that track "rev"?
>
> It does. I changed the test to if(rev).
Cool, but above I was also asking the same question about line 231, and
you provided a lot of information about line 231 (and a test to verify
it), but didn't answer if the test in line 231 also tracks rev the same
way...?
...jim
More information about the 2d-dev
mailing list