[OpenJDK 2D-Dev] X11 uniform scaled wide lines and dashed lines; STROKE_CONTROL in Pisces
dlila at redhat.com
Fri Oct 22 11:31:06 PDT 2010
> Does closed JDK emit something on moveto,close? (Or close,close?)
Surprisingly, it does. On moveto,close it draws caps just as if a 0
length line had been drawn. Isn't this a bug? It doesn't make much sense
to me that something should be drawn because of a moveTo.
So, if we want to replicate closed jdk's behaviour, the finish() call there
is correct, but it alone isn't enough. An emitMoveTo needs to be issued,
otherwise the last point of the last drawing command will be connected
to the cap drawn at the last moveTo position.
----- "Jim Graham" <james.graham at oracle.com> wrote:
> This comment may make more sense if I explain that the condition for
> when finish() is executed in closePath is the reverse of the condition
> in move and done. I agree that it should return if prev!=OP_TO, but
> not so sure about doing a finish().
> On 10/21/2010 6:10 PM, Jim Graham wrote:
> > Hi Denis,
> > I saw something in the latest webrev that reminded me of an earlier
> > comment.
> > On 10/18/2010 2:21 PM, Denis Lila wrote:
> >>> line 389 - The test here is different from closePath. What if
> >>> were both "prev == DRAWING_OP_TO"?
> >> I am now using prev!=DRAWING_OP_TO (not ==, since it is supposed
> >> execute
> >> finish() if no nonzero length lines have been fed to Stroker yet).
> >> fact
> >> I have removed the "started" variable since it's equivalent to
> >> prev==DRAWING_OP_TO.
> > It looks like closePath still uses a different test than moveTo and
> > pathDone. They all test for DRAWING_OP_TO, but closepath uses !=
> > the others use ==. Is that right?
> > ...jim
More information about the 2d-dev