summaryrefslogtreecommitdiffstats
path: root/src/sp-ellipse.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2013-09-26 20:25:56 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2013-09-26 20:25:56 +0000
commit90c7ce56fa03e18efa7296d12c6ca48f8e322e60 (patch)
tree00941fe9b988c90c21e618d20fa55c0346d52da3 /src/sp-ellipse.cpp
parentFix for Bug #1229605 (inkscape crashes when canceled import pdf). (diff)
downloadinkscape-90c7ce56fa03e18efa7296d12c6ca48f8e322e60.tar.gz
inkscape-90c7ce56fa03e18efa7296d12c6ca48f8e322e60.zip
random code cleanup
(bzr r12596)
Diffstat (limited to 'src/sp-ellipse.cpp')
-rw-r--r--src/sp-ellipse.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 55f308c6b..fc78b9777 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -275,8 +275,6 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
double cx = this->cx.computed;
double cy = this->cy.computed;
- Geom::Point pt;
-
// Snap to the 4 quadrant points of the this, but only if the arc
// spans far enough to include them
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)) {
@@ -284,7 +282,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
for (angle = 0; angle < SP_2PI; angle += M_PI_2) {
if (angle >= this->start && angle <= this->end) {
- pt = Geom::Point(cx + cos(angle)*rx, cy + sin(angle)*ry) * i2dt;
+ Geom::Point pt = Geom::Point(cx + cos(angle)*rx, cy + sin(angle)*ry) * i2dt;
p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT));
}
}
@@ -295,7 +293,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
bool c2 = snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_OBJECT_MIDPOINT);
if (c1 || c2) {
- pt = Geom::Point(cx, cy) * i2dt;
+ Geom::Point pt = Geom::Point(cx, cy) * i2dt;
if (c1) {
p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
@@ -310,13 +308,13 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p,
if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_NODE_CUSP) && slice) {
// Add the start point, if it's not coincident with a quadrant point
if (fmod(this->start, M_PI_2) != 0.0 ) {
- pt = Geom::Point(cx + cos(this->start)*rx, cy + sin(this->start)*ry) * i2dt;
+ Geom::Point pt = Geom::Point(cx + cos(this->start)*rx, cy + sin(this->start)*ry) * i2dt;
p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
}
// Add the end point, if it's not coincident with a quadrant point
if (fmod(this->end, M_PI_2) != 0.0 ) {
- pt = Geom::Point(cx + cos(this->end)*rx, cy + sin(this->end)*ry) * i2dt;
+ Geom::Point pt = Geom::Point(cx + cos(this->end)*rx, cy + sin(this->end)*ry) * i2dt;
p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP));
}
}