- // Rectangles
- Real coords[4];
- const char * attrib_names[] = {"x", "y", "width", "height"};
- for (pugi::xml_node rect = svg.child("rect"); rect; rect = rect.next_sibling("rect"))
+ if (strcmp(child.name(), "svg") == 0 || strcmp(child.name(),"g") == 0
+ || strcmp(child.name(), "group") == 0)
+ {
+ //TODO: Handle translates etc here
+ ParseSVGNode(child, bounds, width, height);
+ continue;
+ }
+ else if (strcmp(child.name(), "path") == 0)
+ {
+ string d = child.attribute("d").as_string();
+ Debug("Path data attribute is \"%s\"", d.c_str());
+ ParseSVGPathData(d, Rect(bounds.x,bounds.y,width,height));
+ }
+ else if (strcmp(child.name(), "rect") == 0)