diff options
Diffstat (limited to 'src/2geom')
| -rw-r--r-- | src/2geom/svg-path.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/2geom/svg-path.h b/src/2geom/svg-path.h index 591eb3aa2..c22f65d11 100644 --- a/src/2geom/svg-path.h +++ b/src/2geom/svg-path.h @@ -48,6 +48,10 @@ public: virtual void quadTo(Point c, Point p) = 0; virtual void arcTo(double rx, double ry, double angle, bool large_arc, bool sweep, Point p) = 0; + + /** Undo the last lineTo, curveTo, etc. call. */ + virtual void backspace() = 0; + virtual void closePath() = 0; virtual void finish() = 0; virtual ~SVGPathSink() {} @@ -120,6 +124,13 @@ public: large_arc, sweep, p); } + void backspace() + { + if (_in_path && _path.size() > 0) { + _path.erase_last(); + } + } + void append(Path const &other, Path::Stitching stitching = Path::NO_STITCHING) { if (!_in_path) { |
