You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@locus.apache.org on 2000/08/09 05:35:39 UTC
cvs commit: xml-fop/src/org/apache/fop/dom/svg SVGMatrixImpl.java
keiron 00/08/08 20:35:38
Modified: src/org/apache/fop/dom/svg SVGMatrixImpl.java
Log:
fixed up skew and rotation
Revision Changes Path
1.3 +6 -5 xml-fop/src/org/apache/fop/dom/svg/SVGMatrixImpl.java
Index: SVGMatrixImpl.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/dom/svg/SVGMatrixImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SVGMatrixImpl.java 2000/07/18 05:39:46 1.2
+++ SVGMatrixImpl.java 2000/08/09 03:35:37 1.3
@@ -1,4 +1,4 @@
-/*-- $Id: SVGMatrixImpl.java,v 1.2 2000/07/18 05:39:46 keiron Exp $ --
+/*-- $Id: SVGMatrixImpl.java,v 1.3 2000/08/09 03:35:37 keiron Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -239,6 +239,7 @@
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 @@
{
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 @@
{
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);
}