Kevin POCHAT
2012-02-18 17:51:12 UTC
Hello everyone,
I guess as this is my first message to this list, I should present myself a
little bit.
I have 5 years of professionnal experience as Java/Swing developper, am a
technology enthusiast, and especially love everything that is
HMI/GUI/Ergonomy related.
I'm also a would-be independant game developper, and that is the cause of
this message.
I already built a small game engine using batik to transform SVG files into
PNG (depending on game resolution) drawn using an OpenGL back-end (LWJGL).
So far, so good, but what I'm up to these days is to use Inkscape as a
level designing tool as well.
To do so, I use one layer as the graphics source (to be used as map art),
and another one to put some metadata (AI path, areas of various types...).
Now, I'm trying to use batik to parse my SVG files, create my object model
accrodingly, and strip these metadata from the document before PNG
conversion.
My main issue is to find some classes that will be able to parse a <path>
element's "d" attribute contents into an OO API, like CubicCurve2D.
I already managed to retrieve the "d"'s value into a String object, but
PathParser seem to need to work with a yet-to-implement PathHandler
implementor. The metadata stripping part was covered easily too.
Any Cubic curve or Bezier Path API should do the trick. The features I wish
to have are path length, x,y coordinates of point on curve at X% of
length...
Could you guide me towards such an API, or code example ? I really get lost
in the tremendous amount of batik classes, and I hate the genericity of
Node/NodeList/Element/Document type of classes.
Best regards,
Kevin POCHAT
I guess as this is my first message to this list, I should present myself a
little bit.
I have 5 years of professionnal experience as Java/Swing developper, am a
technology enthusiast, and especially love everything that is
HMI/GUI/Ergonomy related.
I'm also a would-be independant game developper, and that is the cause of
this message.
I already built a small game engine using batik to transform SVG files into
PNG (depending on game resolution) drawn using an OpenGL back-end (LWJGL).
So far, so good, but what I'm up to these days is to use Inkscape as a
level designing tool as well.
To do so, I use one layer as the graphics source (to be used as map art),
and another one to put some metadata (AI path, areas of various types...).
Now, I'm trying to use batik to parse my SVG files, create my object model
accrodingly, and strip these metadata from the document before PNG
conversion.
My main issue is to find some classes that will be able to parse a <path>
element's "d" attribute contents into an OO API, like CubicCurve2D.
I already managed to retrieve the "d"'s value into a String object, but
PathParser seem to need to work with a yet-to-implement PathHandler
implementor. The metadata stripping part was covered easily too.
Any Cubic curve or Bezier Path API should do the trick. The features I wish
to have are path length, x,y coordinates of point on curve at X% of
length...
Could you guide me towards such an API, or code example ? I really get lost
in the tremendous amount of batik classes, and I hate the genericity of
Node/NodeList/Element/Document type of classes.
Best regards,
Kevin POCHAT