diff --git a/src/2geom/curve.h b/src/2geom/curve.h
index af02d6edba9d3afeb4db2292cfef3fccd2d5c3b7..65bf86ef6e7570db3f08707e5458e7e1355dcdf4 100644 (file)
--- a/src/2geom/curve.h
+++ b/src/2geom/curve.h
virtual int winding(Point p) const { return root_winding(*this, p); }
virtual int winding(Point p) const { return root_winding(*this, p); }
+ virtual int degreesOfFreedom() const { return 0;}
+
//mental: review these
virtual Curve *portion(double f, double t) const = 0;
virtual Curve *reverse() const { return portion(1, 0); }
//mental: review these
virtual Curve *portion(double f, double t) const = 0;
virtual Curve *reverse() const { return portion(1, 0); }
*/
virtual Point unitTangentAt(Coord t, unsigned n = 3) const
{
*/
virtual Point unitTangentAt(Coord t, unsigned n = 3) const
{
- std::vector<Point> derivs = pointAndDerivatives(t, n);
- for (unsigned deriv_n = 1; deriv_n < derivs.size(); deriv_n++) {
+ std::vector<Point> derivs = pointAndDerivatives(t, n);
+ for (unsigned deriv_n = 1; deriv_n < derivs.size(); deriv_n++) {
Coord length = derivs[deriv_n].length();
if ( ! are_near(length, 0) ) {
// length of derivative is non-zero, so return unit vector
Coord length = derivs[deriv_n].length();
if ( ! are_near(length, 0) ) {
// length of derivative is non-zero, so return unit vector
- derivs[deriv_n] / length;
+ return derivs[deriv_n] / length;
}
}
return Point (0,0);
}
}
return Point (0,0);
fill-column:99
End:
*/
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :