From a03fbcd36d55eb8e79dd7fef5ee9d67365f471cf Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Mon, 5 Apr 2010 01:26:13 +0200 Subject: Coords: fix guidelines (bzr r9281.1.14) --- src/sp-guide.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sp-guide.cpp') diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index f5edf7d97..def039937 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -217,12 +217,14 @@ static void sp_guide_set(SPObject *object, unsigned int key, const gchar *value) success += sp_svg_number_read_d(strarray[1], &newy); g_strfreev (strarray); if (success == 2) { - guide->point_on_line = Geom::Point(newx, newy); + // Desktop coords fix + guide->point_on_line = Geom::Point(newx, sp_document_height(guide->document) - newy); } else if (success == 1) { // before 0.46 style guideline definition. const gchar *attr = SP_OBJECT_REPR(object)->attribute("orientation"); if (attr && !strcmp(attr, "horizontal")) { - guide->point_on_line = Geom::Point(0, newx); + // Desktop coords fix + guide->point_on_line = Geom::Point(0, sp_document_height(guide->document) - newx); } else { guide->point_on_line = Geom::Point(newx, 0); } -- cgit v1.2.3