From 1fa0c72b664afa4803dffd463ed11ce01632ab76 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Wed, 12 Sep 2018 16:43:47 +0200 Subject: 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 --- src/ui/tools/spray-tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui/tools/spray-tool.cpp') diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp index c56bceda4..0cad1382e 100644 --- a/src/ui/tools/spray-tool.cpp +++ b/src/ui/tools/spray-tool.cpp @@ -969,7 +969,7 @@ static bool sp_spray_recursive(SPDesktop *desktop, sp_spray_scale_rel(center,desktop, item_copied, Geom::Scale(scale)); sp_spray_rotate_rel(center,desktop,item_copied, Geom::Rotate(angle)); // Move the cursor p - sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item_copied, Geom::Translate(move * desktop->doc2dt().withoutTranslation())); Inkscape::GC::release(copy); if(picker){ sp_desktop_apply_css_recursive(item_copied, css, true); @@ -1013,7 +1013,7 @@ static bool sp_spray_recursive(SPDesktop *desktop, sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(_scale, _scale)); sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(scale, scale)); sp_spray_rotate_rel(center, desktop, item_copied, Geom::Rotate(angle)); - sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item_copied, Geom::Translate(move * desktop->doc2dt().withoutTranslation())); // Union and duplication set->clear(); @@ -1101,7 +1101,7 @@ static bool sp_spray_recursive(SPDesktop *desktop, sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(_scale, _scale)); sp_spray_scale_rel(center, desktop, item_copied, Geom::Scale(scale, scale)); sp_spray_rotate_rel(center, desktop, item_copied, Geom::Rotate(angle)); - sp_item_move_rel(item_copied, Geom::Translate(move[Geom::X], -move[Geom::Y])); + sp_item_move_rel(item_copied, Geom::Translate(move * desktop->doc2dt().withoutTranslation())); if(picker){ sp_desktop_apply_css_recursive(item_copied, css, true); } -- cgit v1.2.3