Hi,

this patch is a correction for the calculation of transformation matrices for skewX and skewY. With the patch applied the SVG test file coords-trans-03-t.svg (opened with File->Open) is displayed nearly correctly, only text and a black marker is still missing.

Christina


>From b85fa236b7b79a3d617675420a3d081167988023 Mon Sep 17 00:00:00 2001
From: Christina Rossmanith <[email protected]>
Date: Sun, 1 Apr 2012 21:14:10 +0200
Subject: [PATCH] SVG: treat skewX and skewY correct

---
 filter/source/svg/parserfragments.cxx |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx
index d70eaad..3de3d4b 100644
--- a/filter/source/svg/parserfragments.cxx
+++ b/filter/source/svg/parserfragments.cxx
@@ -93,16 +93,16 @@ void calcRotation(std::vector<geometry::AffineMatrix2D>& rTransforms,
 void calcSkewX(std::vector<geometry::AffineMatrix2D>& rTransforms,
                double                                 fSkewAngle)
 {
-    geometry::AffineMatrix2D aMat(1.0,0.0,0.0,
-                                  tan(fSkewAngle*M_PI/180),1.0,0.0);
+    geometry::AffineMatrix2D aMat(1.0,tan(fSkewAngle*M_PI/180),0.0,
+                                  0.0,1.0,0.0);
     rTransforms.push_back(aMat);
 }
 
 void calcSkewY(std::vector<geometry::AffineMatrix2D>& rTransforms,
                double                                 fSkewAngle)
 {
-    geometry::AffineMatrix2D aMat(1.0,tan(fSkewAngle*M_PI/180),0.0,
-                                  0.0,1.0,0.0);
+    geometry::AffineMatrix2D aMat(1.0,0.0,0.0,
+                                  tan(fSkewAngle*M_PI/180),1.0,0.0);
     rTransforms.push_back(aMat);
 }
 
-- 
1.7.4.1

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to