[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
dlila at redhat.com
Wed Oct 20 10:29:45 PDT 2010
> 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...?
Oh, no, line 231 isn't mean to be related to rev at all. It just checks
to see on which side of the (omx,omy),(mx,my) chord the computed (mmx, mmy)
----- "Jim Graham" <james.graham at oracle.com> wrote:
> 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
> >> at 180 degrees (is that test reliable for the randomization that
> >> happen when omxy are directly opposite mxy)?
> > isCw is used for computing the arc bisector by testing whether the
> > 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
> >> 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
> >> place may be more robust for that case. A test for this is to
> >> "(0,0) -> (100,0) -> (0,0)" with round caps and then rotate it
> >> 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
> > 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).
More information about the 2d-dev