summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/tweak-tool.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-12 14:43:47 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-12 14:43:47 +0000
commit1fa0c72b664afa4803dffd463ed11ce01632ab76 (patch)
treec1f746d4e8f7a5d65541cf6c05d3cdc79b3f9c10 /src/ui/tools/tweak-tool.cpp
parentFix preferences crash (diff)
downloadinkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.tar.gz
inkscape-1fa0c72b664afa4803dffd463ed11ce01632ab76.zip
New option to invert y-axis
Replaces all hard coded or implicit desktop coordinate usage with doc2dt multiplication. New global preference: Interface > Origin at upper left https://bugs.launchpad.net/inkscape/+bug/170049
Diffstat (limited to 'src/ui/tools/tweak-tool.cpp')
-rw-r--r--src/ui/tools/tweak-tool.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp
index 060131b49..d0b8209f0 100644
--- a/src/ui/tools/tweak-tool.cpp
+++ b/src/ui/tools/tweak-tool.cpp
@@ -397,7 +397,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (a->contains(p)) x = 0;
if (x < 1) {
Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) * vector;
- sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y]));
+ sp_item_move_rel(item, Geom::Translate(move * selection->desktop()->doc2dt().withoutTranslation()));
did = true;
}
}
@@ -411,7 +411,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (x < 1) {
Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) *
(reverse? (a->midpoint() - p) : (p - a->midpoint()));
- sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y]));
+ sp_item_move_rel(item, Geom::Translate(move * selection->desktop()->doc2dt().withoutTranslation()));
did = true;
}
}
@@ -426,7 +426,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (a->contains(p)) x = 0;
if (x < 1) {
Geom::Point move = force * 0.5 * (cos(M_PI * x) + 1) * Geom::Point(cos(dp)*dr, sin(dp)*dr);
- sp_item_move_rel(item, Geom::Translate(move[Geom::X], -move[Geom::Y]));
+ sp_item_move_rel(item, Geom::Translate(move * selection->desktop()->doc2dt().withoutTranslation()));
did = true;
}
}
@@ -452,6 +452,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
if (a->contains(p)) x = 0;
if (x < 1) {
double angle = (reverse? force : -force) * 0.05 * (cos(M_PI * x) + 1) * M_PI;
+ angle *= -selection->desktop()->yaxisdir();
sp_item_rotate_rel(item, Geom::Rotate(angle));
did = true;
}