diff options
| author | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-07-12 05:51:13 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mailat-signdiedenrezidotnl> | 2010-07-12 05:51:13 +0000 |
| commit | 35300c9822f9f84c8a011913235fd4e5dc2c5ac8 (patch) | |
| tree | 87c2a9ead85042f584c7b6411adfb7118496333d /src/live_effects/lpe-circle_3pts.cpp | |
| parent | Stop setting of stops from getting url() reference colors. (diff) | |
| download | inkscape-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_3pts.cpp')
| -rw-r--r-- | src/live_effects/lpe-circle_3pts.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/live_effects/lpe-circle_3pts.cpp b/src/live_effects/lpe-circle_3pts.cpp index d600ef046..951a3b7c8 100644 --- a/src/live_effects/lpe-circle_3pts.cpp +++ b/src/live_effects/lpe-circle_3pts.cpp @@ -17,6 +17,7 @@ // You might need to include other 2geom files. You can add them here: #include <2geom/path.h> +#include <2geom/circle.h> namespace Inkscape { namespace LivePathEffect { @@ -30,24 +31,6 @@ LPECircle3Pts::~LPECircle3Pts() { } -static void _circle(Geom::Point center, double radius, std::vector<Geom::Path> &path_out) { - using namespace Geom; - - 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); -} - static void _circle3(Geom::Point const &A, Geom::Point const &B, Geom::Point const &C, std::vector<Geom::Path> &path_out) { using namespace Geom; @@ -64,7 +47,8 @@ static void _circle3(Geom::Point const &A, Geom::Point const &B, Geom::Point con Point M = D + v * lambda; double radius = L2(M - A); - _circle(M, radius, path_out); + Geom::Circle c(M, radius); + c.getPath(path_out); } std::vector<Geom::Path> |
