summaryrefslogtreecommitdiffstats
path: root/src/2geom/curve.h
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-05-22 08:23:27 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-05-22 08:23:27 +0000
commit25fa09178b7d0d0befa708e93ea5316ef381caa0 (patch)
tree550b4d0d66d0d234b3f49e868cb747987dcc6bf8 /src/2geom/curve.h
parentMerge from trunk (diff)
downloadinkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.tar.gz
inkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.zip
Update to 2Geom revision 2396
(bzr r14059.2.16)
Diffstat (limited to 'src/2geom/curve.h')
-rw-r--r--src/2geom/curve.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/2geom/curve.h b/src/2geom/curve.h
index 893dc6bdb..7da0d17a0 100644
--- a/src/2geom/curve.h
+++ b/src/2geom/curve.h
@@ -94,6 +94,9 @@ public:
* no other points (its value set contains only one element). */
virtual bool isDegenerate() const = 0;
+ /// Check whether the curve is a line segment.
+ virtual bool isLineSegment() const { return false; }
+
/** @brief Get the interval of allowed time values.
* @return \f$[0, 1]\f$ */
virtual Interval timeRange() const {
@@ -294,13 +297,7 @@ public:
* derivative could be found.
* @param t Time value
* @param n The maximum order of derivative to consider
- * @return Unit tangent vector \f$\mathbf{v}(t)\f$
- * @bug This method might currently break for the case of t being exactly 1. A workaround
- * is to reverse the curve and use the negated unit tangent at 0 like this:
- * @code
- Curve *c_reverse = c.reverse();
- Point tangent = - c_reverse->unitTangentAt(0);
- delete c_reverse; @endcode */
+ * @return Unit tangent vector \f$\mathbf{v}(t)\f$ */
virtual Point unitTangentAt(Coord t, unsigned n = 3) const;
/** @brief Convert the curve to a symmetric power basis polynomial.