diff options
| author | suv-lp <> | 2016-11-08 07:38:43 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2016-11-08 07:38:43 +0000 |
| commit | 03207cc260784b70b83f5fbbeec3bd88533989dd (patch) | |
| tree | dc19456e949e8607e626825d3c7bc82b5257662b /src/sp-ellipse.cpp | |
| parent | [Bug #262341] Tooltips for LPE tool modes do not show up as translated. (diff) | |
| download | inkscape-03207cc260784b70b83f5fbbeec3bd88533989dd.tar.gz inkscape-03207cc260784b70b83f5fbbeec3bd88533989dd.zip | |
[Bug #1638472] Quadrant points of ellipse/circle fail to snap (as source or target).
Fixed bugs:
- https://launchpad.net/bugs/1638472
(bzr r15226)
Diffstat (limited to 'src/sp-ellipse.cpp')
| -rw-r--r-- | src/sp-ellipse.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 0d60aa5d8..ed1e2b504 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -32,11 +32,12 @@ #include "svg/svg.h" #include "svg/path-string.h" +#define SP_2PI (2 * M_PI) SPGenericEllipse::SPGenericEllipse() : SPShape() , start(0) - , end(M_2_PI) + , end(SP_2PI) , type(SP_GENERIC_ELLIPSE_UNDEFINED) , _closed(true) { @@ -527,7 +528,7 @@ void SPGenericEllipse::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, // Snap to the 4 quadrant points of the ellipse, but only if the arc // spans far enough to include them if (snapprefs->isTargetSnappable(Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)) { - for (double angle = 0; angle < M_2_PI; angle += M_PI_2) { + for (double angle = 0; angle < SP_2PI; angle += M_PI_2) { if (Geom::AngleInterval(this->start, this->end, true).contains(angle)) { Geom::Point pt = this->getPointAtAngle(angle) * i2dt; p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_ELLIPSE_QUADRANT_POINT, Inkscape::SNAPTARGET_ELLIPSE_QUADRANT_POINT)); @@ -662,7 +663,7 @@ bool SPGenericEllipse::_isSlice() const { Geom::AngleInterval a(this->start, this->end, true); - return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), M_2_PI)); + return !(Geom::are_near(a.extent(), 0) || Geom::are_near(a.extent(), SP_2PI)); } /* |
