Hi Jim.

> 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.

Regards,
Denis.

----- "Jim Graham" <james.gra...@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
> I'm 
> not so sure about doing a finish().
> 
>                       ...jim
> 
> 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
> they
> >>> were both "prev == DRAWING_OP_TO"?
> >>
> >> I am now using prev!=DRAWING_OP_TO (not ==, since it is supposed
> to
> >> execute
> >> finish() if no nonzero length lines have been fed to Stroker yet).
> In
> >> 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 !=
> whereas
> > the others use ==. Is that right?
> >
> > ...jim

Reply via email to