From 41762383e9792304fd05e57675ad242bf08bce91 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Wed, 9 Aug 2000 03:35:37 +0000 Subject: [PATCH] fixed up skew and rotation git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193611 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/dom/svg/SVGMatrixImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/dom/svg/SVGMatrixImpl.java b/src/org/apache/fop/dom/svg/SVGMatrixImpl.java index 13b5954bd..4656f22f2 100644 --- a/src/org/apache/fop/dom/svg/SVGMatrixImpl.java +++ b/src/org/apache/fop/dom/svg/SVGMatrixImpl.java @@ -239,6 +239,7 @@ public class SVGMatrixImpl implements SVGMatrix { public SVGMatrix rotate ( float angle ) throws SVGException { + angle = (float)(angle * Math.PI / 180f); SVGMatrix matrix = new SVGMatrixImpl(); matrix.setA((float)Math.cos(angle)); matrix.setB((float)Math.sin(angle)); @@ -266,8 +267,8 @@ public class SVGMatrixImpl implements SVGMatrix { { SVGMatrix matrix = new SVGMatrixImpl(); matrix.setA(1); - matrix.setB((float)Math.sin(angle)); - matrix.setC(0); + matrix.setB(0); + matrix.setC((float)Math.sin(angle)); matrix.setD(1); return multiply(matrix); } @@ -276,8 +277,8 @@ public class SVGMatrixImpl implements SVGMatrix { { SVGMatrix matrix = new SVGMatrixImpl(); matrix.setA(1); - matrix.setB(0); - matrix.setC((float)-Math.sin(angle)); + matrix.setB((float)Math.sin(angle)); + matrix.setC(0); matrix.setD(1); return multiply(matrix); } -- 2.39.5