I read that PathIterator.SEG_CLOSE add a segment back to the point
corresponding to the most recent SEG_MOVETO.
In our case, this segment already exists because the linestring is
closed.

The linestring is closed, but Java2D won't build a bevel without the
SEG_CLOSE on the last segment. If it is closed, then it just won't
need to explicitly close it for us.

By the way, JUMP didn't originally close linestrings, just polygons.
See the attached Thicklines.png.  I think it looks much better now
(see After.png).

regards,
Larry


On 7/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:
Hi,

I tested this one, but it did not change the result for me.
The JOIN_BEVEL appears and desappears depending on scale in both cases,
with old code and with your patch.

I read that PathIterator.SEG_CLOSE add a segment back to the point
corresponding to the most recent SEG_MOVETO.
In our case, this segment already exists because the linestring is
closed. Will we have to trace one more segment (over the first one) ?
How your code is supposed to change the join type?

Michaël


Larry Becker a écrit :

>We recently implemented some modifications to Java2DConverter and
>PolygonShape to use PathIterator.  The implementation was slightly
>flawed and resulted in paths that didn't use a SEG_CLOSE which causes
>closed paths to fail to connect start and end with a JOIN_BEVEL.  You
>can see the problem very easily if you start OJ, drag out a rectangle,
>and then increase the line width to 10.
>
>The fix is:
>
>               private int getSegType(){
>                       if (closed && (iterate == numPoints-1))
>                               return PathIterator.SEG_CLOSE;
>                       return (iterate==0) ? PathIterator.SEG_MOVETO : 
PathIterator.SEG_LINETO;
>               }
>
>I would also like to increase the accuracy of the rendering system
>from float to double by replacing all references to GeneralPath with
>Path2D.Double.  There is no speed or memory penalty for this change.
>
>regards,
>Larry Becker
>
>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



--
http://amusingprogrammer.blogspot.com/

<<attachment: ThickLines.PNG>>

<<attachment: After.PNG>>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to