You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by oraether <Ol...@Emerson.com> on 2011/07/06 21:31:35 UTC
Convert Path to Polygone
Has anyone an idea (or a link to a library) how to convert a PATH into
polygon points ?
But not only the lineTo parts - of course the curve (A,C) elements as well.
--
View this message in context: http://batik.2283329.n4.nabble.com/Convert-Path-to-Polygone-tp3649773p3649773.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Convert Path to Polygone
Posted by oraether <Ol...@Emerson.com>.
Thanks,
I took the Transcoder approach where I get Shape within a Graphics2d
context.
Then I use the PathIterator with flatness parameter so I only get MOVETO
and LINETO.
--
View this message in context: http://batik.2283329.n4.nabble.com/Convert-Path-to-Polygone-tp3649773p3652221.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Convert Path to Polygone
Posted by th...@kodak.com.
Hi Olaf,
oraether <Ol...@Emerson.com> wrote on 07/06/2011 03:31:35 PM:
> Has anyone an idea (or a link to a library) how to convert a PATH into
> polygon points ?
> But not only the lineTo parts - of course the curve (A,C) elements as
well.
In Batik there are classes to convert a path string into a AWT
Shape element
(in particular org.apache.batik.parser.AWTPathProducer). Once you have an
AWT Shape
element you can call it's getPathIterator with a flatness and it will
tesselate the curves to the
specified accuracy.
Thomas DeWeese | CDG Advanced Development |
Eastman Kodak Company | 343 State Street | Rochester, NY 14650-0128 |
Thomas.DeWeese@Kodak.com | 585 724-0294 |
www.kodak.com