Code

revert change of sp_item_i2d_affine in rev 20388, as it crashed command line use
authorspeleo3 <speleo3@users.sourceforge.net>
Sun, 21 Dec 2008 01:03:08 +0000 (01:03 +0000)
committerspeleo3 <speleo3@users.sourceforge.net>
Sun, 21 Dec 2008 01:03:08 +0000 (01:03 +0000)
src/sp-item.cpp

index fb13b1770bf1d36e4fca810003d960c9f7b2110e..b5d9050c69685d26b2ab183b8ab1623b64c56ac7 100644 (file)
@@ -1553,8 +1553,10 @@ Geom::Matrix sp_item_i2d_affine(SPItem const *item)
     g_assert(item != NULL);
     g_assert(SP_IS_ITEM(item));
 
-    SPDesktop *desktop = inkscape_active_desktop();
-    return sp_item_i2doc_affine(item) * desktop->doc2dt();
+    Geom::Matrix const ret( sp_item_i2doc_affine(item)
+                          * Geom::Scale(1, -1)
+                          * Geom::Translate(0, sp_document_height(SP_OBJECT_DOCUMENT(item))) );
+    return ret;
 }
 
 void sp_item_set_i2d_affine(SPItem *item, Geom::Matrix const &i2dt)