diff options
Diffstat (limited to 'src/2geom/circle.cpp')
| -rw-r--r-- | src/2geom/circle.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/2geom/circle.cpp b/src/2geom/circle.cpp index 06eb4c2a1..d021882ea 100644 --- a/src/2geom/circle.cpp +++ b/src/2geom/circle.cpp @@ -88,7 +88,9 @@ void Circle::set(std::vector<Point> const& points) model.instance(*this, fitter.result(z)); } - +/** + @param inner a point whose angle with the circle center is inside the angle that the arc spans + */ EllipticalArc * Circle::arc(Point const& initial, Point const& inner, Point const& final, bool _svg_compliant) @@ -98,10 +100,8 @@ Circle::arc(Point const& initial, Point const& inner, Point const& final, return e.arc(initial, inner, final, _svg_compliant); } -void -Circle::getPath(std::vector<Path> &path_out) { - Path pb; - +D2<SBasis> Circle::toSBasis() +{ D2<SBasis> B; Linear bo = Linear(0, 2 * M_PI); @@ -110,6 +110,15 @@ Circle::getPath(std::vector<Path> &path_out) { B = B * m_ray + m_centre; + return B; +} + +void +Circle::getPath(std::vector<Path> &path_out) { + Path pb; + + D2<SBasis> B = toSBasis(); + pb.append(SBasisCurve(B)); path_out.push_back(pb); |
