diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-07-17 19:47:09 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-07-17 19:47:09 +0000 |
| commit | eed6e9c2c229b10911a23976c47da79fc70a5b87 (patch) | |
| tree | cf0be87e45680dac877bec1cd628b86fe020cf7e /src/sp-ellipse.cpp | |
| parent | Fix build failures on make check (diff) | |
| download | inkscape-eed6e9c2c229b10911a23976c47da79fc70a5b87.tar.gz inkscape-eed6e9c2c229b10911a23976c47da79fc70a5b87.zip | |
- rename SPItem::i2d_affine to i2dt_affine, to clarify that it is item-to-desktop, not item-to-document. This should make it easier to spot bugs.
- tag some instances where the document-to-desktop transform has been hardcoded
(bzr r10466)
Diffstat (limited to 'src/sp-ellipse.cpp')
| -rw-r--r-- | src/sp-ellipse.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 7ebedb816..d2ca2c445 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -282,7 +282,7 @@ static void sp_genericellipse_snappoints(SPItem const *item, std::vector<Inkscap SPGenericEllipse *ellipse = SP_GENERICELLIPSE(item); sp_genericellipse_normalize(ellipse); - Geom::Affine const i2d = item->i2d_affine(); + Geom::Affine const i2dt = item->i2dt_affine(); // figure out if we have a slice, while guarding against rounding errors bool slice = false; @@ -308,7 +308,7 @@ static void sp_genericellipse_snappoints(SPItem const *item, std::vector<Inkscap double angle = 0; for (angle = 0; angle < SP_2PI; angle += M_PI_2) { if (angle >= ellipse->start && angle <= ellipse->end) { - pt = Geom::Point(cx + cos(angle)*rx, cy + sin(angle)*ry) * i2d; + 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)); } } @@ -316,7 +316,7 @@ static void sp_genericellipse_snappoints(SPItem const *item, std::vector<Inkscap // Add the centre, if we have a closed slice or when explicitly asked for if ((snapprefs->getSnapToItemNode() && slice && ellipse->closed) || snapprefs->getSnapObjectMidpoints()) { - pt = Geom::Point(cx, cy) * i2d; + pt = Geom::Point(cx, cy) * i2dt; p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); } @@ -324,12 +324,12 @@ static void sp_genericellipse_snappoints(SPItem const *item, std::vector<Inkscap if (snapprefs->getSnapToItemNode() && slice) { // Add the start point, if it's not coincident with a quadrant point if (fmod(ellipse->start, M_PI_2) != 0.0 ) { - pt = Geom::Point(cx + cos(ellipse->start)*rx, cy + sin(ellipse->start)*ry) * i2d; + pt = Geom::Point(cx + cos(ellipse->start)*rx, cy + sin(ellipse->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(ellipse->end, M_PI_2) != 0.0 ) { - pt = Geom::Point(cx + cos(ellipse->end)*rx, cy + sin(ellipse->end)*ry) * i2d; + pt = Geom::Point(cx + cos(ellipse->end)*rx, cy + sin(ellipse->end)*ry) * i2dt; p.push_back(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_CUSP, Inkscape::SNAPTARGET_NODE_CUSP)); } } |
