29#include <boost/python.hpp>
38using namespace boost::python;
46class PathSinkWrap:
public Geom::PathSink,
public wrapper<Geom::PathSink> {
51 void arcTo(
double rx,
double ry,
double angle,
bool large_arc,
bool sweep,
Geom::Point const &p) {this->get_override(
"arcTo")(rx, ry, angle, large_arc, sweep, p);}
52 bool backspace() {
return this->get_override(
"backspace")();}
53 void closePath() {this->get_override(
"closePath")();}
54 void flush() {this->get_override(
"flush")();}
62 class_<PathSinkWrap, boost::noncopyable>(
"PathSink")
void(Geom::PathSink::* feed_pathvector)(Geom::PathVector const &)
void(* parse_svg_path_str_sink)(char const *, Geom::PathSink &)
void(Geom::PathSink::* feed_path)(Geom::Path const &)
Geom::PathVector(* parse_svg_path_str)(char const *)
Callback interface for processing path data.
virtual void arcTo(Coord rx, Coord ry, Coord angle, bool large_arc, bool sweep, Point const &p)=0
Output an elliptical arc segment.
virtual void flush()=0
Flush any internal state of the generator.
virtual void lineTo(Point const &p)=0
Output a line segment.
virtual void quadTo(Point const &c, Point const &p)=0
Output a cubic Bezier segment.
virtual void closePath()=0
Close the current path with a line segment.
virtual void curveTo(Point const &c0, Point const &c1, Point const &p)=0
Output a quadratic Bezier segment.
virtual bool backspace()
Undo the last segment.
virtual void moveTo(Point const &p)=0
Move to a different point without creating a segment.
Two-dimensional point that doubles as a vector.
Path and its polyline approximation.
void parse_svg_path(char const *str, PathSink &sink)
Feed SVG path data to the specified sink.
PathVector read_svgd(char const *filename)
Create path vector from SVG path data stored in a file.
Various utility functions.
callback interface for SVG path data
parse SVG path specifications