Hi Leon,
Two points, first you may have missed that Batik includes a whole set of 'micro parsers' that it uses to parse these basic attributes, so presumably you could have used them (the dependencies are fairly light as I recall).
Second I don't think your path parser is quite con formant. In particular it seems to require that the path letter be repeated for each segment, the spec makes it clear that they can be omitted if you have a sequence of the same curve type (although most generators output the extra letters).
Leon Franzen wrote:
Hardly Batik related, but here's a small SVG path element "d" attrib parser that I wrote for a game I'm working on. I tried to use Batik at first but the project dependencies needed to stay small so I went with this. I'm sure it's not efficient, but it works for me. I have some more code to go with this to parse nested groups, line and fill style and associated transforms if you're interested.
I use Inkscape to draw graphics and then use "convert-to-path" on all my primitives so rectangles, circles, etc are converted to paths. Mostly because I was lazy and didn't want to write parsers for these.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
