Lines Matching refs:str
36 * Parses the path in str. When an error is found in the pathstring, this method
38 * Returns an empty PathVector when str==NULL
40 Geom::PathVector sp_svg_read_pathv(char const * str)
43 if (!str)
44 return pathv; // return empty pathvector when str == NULL
51 parser.parse(str);
56 //g_warning("Malformed SVG path, truncated path up to where error was found.\n Input path=\"%s\"\n Parsed path=\"%s\"", str, sp_svg_write_path(pathv));
62 static void sp_svg_write_curve(Inkscape::SVG::PathString & str, Geom::Curve const * c) {
68 str.verticalLineTo( line_segment->finalPoint()[Geom::Y] );
70 str.horizontalLineTo( line_segment->finalPoint()[Geom::X] );
72 str.lineTo( (*line_segment)[1][0], (*line_segment)[1][1] );
77 str.quadTo( (*quadratic_bezier)[1][0], (*quadratic_bezier)[1][1],
81 str.curveTo( (*cubic_bezier)[1][0], (*cubic_bezier)[1][1],
86 str.arcTo( elliptical_arc->ray(Geom::X), elliptical_arc->ray(Geom::Y),
96 sp_svg_write_curve(str, &(*iter));
101 static void sp_svg_write_path(Inkscape::SVG::PathString & str, Geom::Path const & p) {
102 str.moveTo( p.initialPoint()[0], p.initialPoint()[1] );
105 sp_svg_write_curve(str, &(*cit));
109 str.closePath();
114 Inkscape::SVG::PathString str;
117 sp_svg_write_path(str, *pit);
120 return g_strdup(str.c_str());
124 Inkscape::SVG::PathString str;
126 sp_svg_write_path(str, p);
128 return g_strdup(str.c_str());