-struct svgtiny_parse_state {
- struct svgtiny_diagram *diagram;
- xmlDoc *document;
-
- float viewport_width;
- float viewport_height;
-
- /* current transformation matrix */
- struct {
- float a, b, c, d, e, f;
- } ctm;
-
- /*struct css_style style;*/
-
- /* paint attributes */
- svgtiny_colour fill;
- svgtiny_colour stroke;
- int stroke_width;
-};
-
-
-static bool svgtiny_parse_svg(xmlNode *svg, struct svgtiny_parse_state state);
-static bool svgtiny_parse_path(xmlNode *path, struct svgtiny_parse_state state);
-static bool svgtiny_parse_rect(xmlNode *rect, struct svgtiny_parse_state state);
-static bool svgtiny_parse_circle(xmlNode *circle,
+static svgtiny_code svgtiny_parse_svg(xmlNode *svg,
+ struct svgtiny_parse_state state);
+static svgtiny_code svgtiny_parse_path(xmlNode *path,
+ struct svgtiny_parse_state state);
+static svgtiny_code svgtiny_parse_rect(xmlNode *rect,
+ struct svgtiny_parse_state state);
+static svgtiny_code svgtiny_parse_circle(xmlNode *circle,
+ struct svgtiny_parse_state state);
+static svgtiny_code svgtiny_parse_line(xmlNode *line,
+ struct svgtiny_parse_state state);
+static svgtiny_code svgtiny_parse_poly(xmlNode *poly,
+ struct svgtiny_parse_state state, bool polygon);
+static svgtiny_code svgtiny_parse_text(xmlNode *text,