diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/2geom/circle.cpp | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
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); |
