summaryrefslogtreecommitdiffstats
path: root/src/2geom/circle.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-01-18 09:11:04 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-01-18 09:11:04 +0000
commitf12d6a57fe5cc18be5afd164061578d8e00d75ce (patch)
tree7fd1a501a8a545fbf2326ead48cd041928699c5e /src/2geom/circle.cpp
parentupdate to trunk (diff)
parentFix missing embeded image condition, kindly caught by suv in bug #1270334 (diff)
downloadinkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.tar.gz
inkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.zip
update to trunk
(bzr r11950.1.235)
Diffstat (limited to 'src/2geom/circle.cpp')
-rw-r--r--src/2geom/circle.cpp19
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);