32#ifndef LIB2GEOM_SEEN_PATH_SINK_H
33#define LIB2GEOM_SEEN_PATH_SINK_H
70 bool large_arc,
bool sweep,
Point const &p) = 0;
89 virtual void feed(
Curve const &
c,
bool moveto_initial =
true);
115template <
typename OutputIterator>
142 _path.template appendNew<LineSegment>(p);
150 _path.template appendNew<QuadraticBezier>(
c, p);
158 _path.template appendNew<CubicBezier>(c0, c1, p);
162 bool large_arc,
bool sweep,
Point const &p)
override
168 _path.template appendNew<EllipticalArc>(rx, ry, angle,
169 large_arc, sweep, p);
Set of all points at a fixed distance from the center.
Abstract continuous curve on a plane defined on [0,1].
Set of points with a constant sum of distances from two foci.
Store paths to a PathVector.
void clear()
Clear the stored path vector.
PathBuilder(PathVector &pv)
Create a builder that outputs to pathvector given by reference.
PathVector const & peek() const
Retrieve the path.
PathBuilder()
Create a builder that outputs to an internal pathvector.
Store paths to an output iterator.
void quadTo(Point const &c, Point const &p) override
Output a cubic Bezier segment.
bool inPath() const
Detect if the builder is in a path and thus will NOT create a new moveTo command when given the next ...
void setStitching(bool s)
void moveTo(Point const &p) override
Move to a different point without creating a segment.
void append(Path const &other)
bool backspace() override
Undo the last segment.
void arcTo(Coord rx, Coord ry, Coord angle, bool large_arc, bool sweep, Point const &p) override
Output an elliptical arc segment.
void lineTo(Point const &p) override
Output a line segment.
PathIteratorSink(OutputIterator out)
void feed(Path const &other) override
Output a subpath.
void flush() override
Flush any internal state of the generator.
void curveTo(Point const &c0, Point const &c1, Point const &p) override
Output a quadratic Bezier segment.
void closePath() override
Close the current path with a line segment.
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 feed(Curve const &c, bool moveto_initial=true)
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.
void clear()
Remove all paths from the vector.
Sequence of contiguous curves, aka spline.
void setStitching(bool x)
Enable or disable the throwing of exceptions when stitching discontinuities.
void close(bool closed=true)
Set whether the path is closed.
void clear()
Remove all curves from the path.
void append(Curve *curve)
Add a new curve to the end of the path.
Point initialPoint() const
Get the first point in the path.
size_type size() const
Natural size of the path.
void start(Point const &p)
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
Contains forward declarations of 2geom types.
double Coord
Floating point type used to store coordinates.
Various utility functions.
std::back_insert_iterator< PathVector > SubpathInserter
PathVector - a sequence of subpaths.