summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/measure-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/measure-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/measure-tool.cpp')
-rw-r--r--src/ui/tools/measure-tool.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/tools/measure-tool.cpp b/src/ui/tools/measure-tool.cpp
index a305fa350..75335ce1a 100644
--- a/src/ui/tools/measure-tool.cpp
+++ b/src/ui/tools/measure-tool.cpp
@@ -862,6 +862,13 @@ void MeasureTool::setGuide(Geom::Point origin,double angle, const char *label)
if(!namedview) {
return;
}
+
+ // <sodipodi:guide> stores inverted y-axis coordinates
+ if (desktop->is_yaxisdown()) {
+ origin[Geom::Y] = doc->getHeight().value("px") - origin[Geom::Y];
+ angle *= -1.0;
+ }
+
origin *= affine;
//measure angle
Inkscape::XML::Node *guide;