From: Keiron Liddle Date: Wed, 9 Aug 2000 03:35:37 +0000 (+0000) Subject: fixed up skew and rotation X-Git-Tag: pre-columns~266 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=41762383e9792304fd05e57675ad242bf08bce91;p=xmlgraphics-fop.git fixed up skew and rotation git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193611 13f79535-47bb-0310-9956-ffa450edef68 --- 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); }