Re: Need help converting an SVG file into Java (2D) objects
Peter Woodiwiss <[email protected]>
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Kevin, Inkscape can embed images. Got to Extensions->Images->Embed Images.. Pete On 21/02/2012 18:40, Kevin POCHAT wrote: > Hi Thomas, > > Thank you for your answer. > In the meantime, I stumbled upon SVG Salamander, another SVG lib for > Java, that is way featureless, and way lighter, than Batik. For what I > need as of now, it does the job, and the API is way closer to what I > expected for the object model of the SVG document. However, the > PathIterator used to get points along the path does not give me fixed > length segments, but with enough precision, and some easy maths, I > should be able to go with it. I might still turn back to Batik for > SVG->PNG rendering if Salamander does not implement as many tags as > Batik does (my current SVG are very simples : rect, path and gradients > only). > > On another subject (well, not really another), I'd like to integrate > filters and bitmaps (PNG) within my SVG documents (embed the PNG > contents, not a href link), but Inkscape doesn't seem to support that. > Do you know if there's another (free) editor that allows that. I don't > even know if bitmap embedding is possible with SVG. > > Best regards, > > Kevin POCHAT > > > 2012/2/21 Thomas DeWeese <[email protected] > <mailto:[email protected]>> > > Hi Kevin, > > On Feb 18, 2012, at 12:51 PM, Kevin POCHAT <[email protected] > <mailto:[email protected]>> wrote: > >> 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. > > Sure the various parser implementations generally start with AWT > since they produce geom elements from AWT. > > http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/parser/AWTPathProducer.html#createShape(java.io.Reader,%20int) > <http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/parser/AWTPathProducer.html#createShape%28java.io.Reader,%20int%29> > > >