summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-circle_with_radius.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mailat-signdiedenrezidotnl>2010-07-12 05:51:13 +0000
committerDiederik van Lierop <mailat-signdiedenrezidotnl>2010-07-12 05:51:13 +0000
commit35300c9822f9f84c8a011913235fd4e5dc2c5ac8 (patch)
tree87c2a9ead85042f584c7b6411adfb7118496333d /src/live_effects/lpe-circle_with_radius.cpp
parentStop setting of stops from getting url() reference colors. (diff)
downloadinkscape-35300c9822f9f84c8a011913235fd4e5dc2c5ac8.tar.gz
inkscape-35300c9822f9f84c8a011913235fd4e5dc2c5ac8.zip
- Snap while rotating an object using the selector tool
- Rename the ConstraintLine class to SnapConstraint - Move some duplicated code to 2geom (bzr r9607)
Diffstat (limited to 'src/live_effects/lpe-circle_with_radius.cpp')
-rw-r--r--src/live_effects/lpe-circle_with_radius.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/live_effects/lpe-circle_with_radius.cpp b/src/live_effects/lpe-circle_with_radius.cpp
index 574a9c004..71611e18b 100644
--- a/src/live_effects/lpe-circle_with_radius.cpp
+++ b/src/live_effects/lpe-circle_with_radius.cpp
@@ -18,6 +18,7 @@
#include <2geom/sbasis.h>
#include <2geom/bezier-to-sbasis.h>
#include <2geom/d2.h>
+#include <2geom/circle.h>
using namespace Geom;
@@ -38,22 +39,6 @@ LPECircleWithRadius::~LPECircleWithRadius()
}
-void _circle(Geom::Point center, double radius, std::vector<Geom::Path> &path_out) {
- Geom::Path pb;
-
- D2<SBasis> B;
- Linear bo = Linear(0, 2 * M_PI);
-
- B[0] = cos(bo,4);
- B[1] = sin(bo,4);
-
- B = B * radius + center;
-
- pb.append(SBasisCurve(B));
-
- path_out.push_back(pb);
-}
-
std::vector<Geom::Path>
LPECircleWithRadius::doEffect_path (std::vector<Geom::Path> const & path_in)
{
@@ -64,7 +49,8 @@ LPECircleWithRadius::doEffect_path (std::vector<Geom::Path> const & path_in)
double radius = Geom::L2(pt - center);
- _circle(center, radius, path_out);
+ Geom::Circle c(center, radius);
+ c.getPath(path_out);
return path_out;
}