diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-05-22 08:23:27 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-05-22 08:23:27 +0000 |
| commit | 25fa09178b7d0d0befa708e93ea5316ef381caa0 (patch) | |
| tree | 550b4d0d66d0d234b3f49e868cb747987dcc6bf8 /src/2geom/path.h | |
| parent | Merge from trunk (diff) | |
| download | inkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.tar.gz inkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.zip | |
Update to 2Geom revision 2396
(bzr r14059.2.16)
Diffstat (limited to 'src/2geom/path.h')
| -rw-r--r-- | src/2geom/path.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/2geom/path.h b/src/2geom/path.h index 5340df0c5..a6473e0d2 100644 --- a/src/2geom/path.h +++ b/src/2geom/path.h @@ -371,11 +371,14 @@ public: _curves->push_back(_closing_seg); } - /// Construct a path from a rectangle. - Path(Rect const &r); - - /// Construct a path from a convex hull. - Path(ConvexHull const &); + /// Create a path from a rectangle. + explicit Path(Rect const &r); + /// Create a path from a convex hull. + explicit Path(ConvexHull const &); + /// Create a path from a circle, using two elliptical arcs. + explicit Path(Circle const &c); + /// Create a path from an ellipse, using two elliptical arcs. + explicit Path(Ellipse const &e); virtual ~Path() {} @@ -463,8 +466,12 @@ public: /// Check whether the path is closed. bool closed() const { return _closed; } - /// Set whether the path is closed. - void close(bool closed = true) { _closed = closed; } + /** @brief Set whether the path is closed. + * When closing a path where the last segment can be represented as a closing + * segment, the last segment will be removed. When opening a path, the closing + * segment will be erased. This means that closing and then opening a path + * will not always give back the original path. */ + void close(bool closed = true); /** @brief Remove all curves from the path. * The initial and final points of the closing segment are set to (0,0). |
