diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2014-01-12 23:25:39 +0000 |
|---|---|---|
| committer | Johan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl> | 2014-01-12 23:25:39 +0000 |
| commit | 5eb9b4815a12cc0dafd07905f7715a7e15a92b41 (patch) | |
| tree | f39f5ae5a40012fa010402611d2b133553c22335 /src/2geom/circle.cpp | |
| parent | LPE: rename function getHelperPaths --> getCanvasIndicators (the function is ... (diff) | |
| download | inkscape-5eb9b4815a12cc0dafd07905f7715a7e15a92b41.tar.gz inkscape-5eb9b4815a12cc0dafd07905f7715a7e15a92b41.zip | |
update 2geom's copy to r2142
(bzr r12921)
Diffstat (limited to '')
| -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); |
