summaryrefslogtreecommitdiffstats
path: root/src/sp-rect.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-07-17 19:47:09 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-07-17 19:47:09 +0000
commiteed6e9c2c229b10911a23976c47da79fc70a5b87 (patch)
treecf0be87e45680dac877bec1cd628b86fe020cf7e /src/sp-rect.cpp
parentFix build failures on make check (diff)
downloadinkscape-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-rect.cpp')
-rw-r--r--src/sp-rect.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sp-rect.cpp b/src/sp-rect.cpp
index 7cc9c7f29..ec83a47e9 100644
--- a/src/sp-rect.cpp
+++ b/src/sp-rect.cpp
@@ -573,12 +573,12 @@ static void sp_rect_snappoints(SPItem const *item, std::vector<Inkscape::SnapCan
SPRect *rect = SP_RECT(item);
- Geom::Affine const i2d (item->i2d_affine ());
+ Geom::Affine const i2dt (item->i2dt_affine ());
- Geom::Point p0 = Geom::Point(rect->x.computed, rect->y.computed) * i2d;
- Geom::Point p1 = Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2d;
- Geom::Point p2 = Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed) * i2d;
- Geom::Point p3 = Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed) * i2d;
+ Geom::Point p0 = Geom::Point(rect->x.computed, rect->y.computed) * i2dt;
+ Geom::Point p1 = Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2dt;
+ Geom::Point p2 = Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed) * i2dt;
+ Geom::Point p3 = Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed) * i2dt;
if (snapprefs->getSnapToItemNode()) {
p.push_back(Inkscape::SnapCandidatePoint(p0, Inkscape::SNAPSOURCE_CORNER, Inkscape::SNAPTARGET_CORNER));
@@ -612,12 +612,12 @@ sp_rect_convert_to_guides(SPItem *item) {
std::list<std::pair<Geom::Point, Geom::Point> > pts;
- Geom::Affine const i2d(rect->i2d_affine());
+ Geom::Affine const i2dt(rect->i2dt_affine());
- Geom::Point A1(Geom::Point(rect->x.computed, rect->y.computed) * i2d);
- Geom::Point A2(Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2d);
- Geom::Point A3(Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed) * i2d);
- Geom::Point A4(Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed) * i2d);
+ Geom::Point A1(Geom::Point(rect->x.computed, rect->y.computed) * i2dt);
+ Geom::Point A2(Geom::Point(rect->x.computed, rect->y.computed + rect->height.computed) * i2dt);
+ Geom::Point A3(Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed + rect->height.computed) * i2dt);
+ Geom::Point A4(Geom::Point(rect->x.computed + rect->width.computed, rect->y.computed) * i2dt);
pts.push_back(std::make_pair(A1, A2));
pts.push_back(std::make_pair(A2, A3));