Hi Alice,
Alice Mello wrote:
Are you talking about the class or the interface :
org.apache.batik.css.parser Class Parser or org.apache.batik.parser
Interface Parser ?
org.apache.batik.parser (I normally drop org.apache just to make
it easier on the hands).
I will look for example by the batik project. Just by loooking the API,
I have no clue how to use the methods.
Well the two classes of interest are batik.parser.PathParser
and batik.parser.PathHandler (there is also a 'DefaultPathHandler').
You give your String/Reader to the Parser and it will call methods
on the handler as it parses the path.
Thomas DeWeese wrote:
Hi Alice,
Alice Mello wrote:
Given the part of a path data below, I would to know how to interpret
the fourth point after the "c". I imagine that after the triple
cx1,y1 x2,y2 x,y, all the other points are regular Line to (l) points
until the next c appear. Is that correct?
I would strongly suggest that you read the relevant sections of
the SVG specification (in this case 8.3.1)* if you are implementing a
translator. You might also consider using the "micro parsers" from
Batik to parse this data for you (batik.parser package).
I am implementing a translator. I need to read a SVG image and
convert it to my own internal data structure.
[*] The command letter can be eliminated on subsequent commands if the
same command is used multiple times in a row (e.g., you can drop
the second "L" in "M 100 200 L 200 100 L -100 -200" and use "M 100
200 L 200 100 -100 -200" instead).
This means that the next command is also a 'c' not an 'l'.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]