xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r954244 - in /xmlgraphics/commons/trunk: src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java status.xml
Date Sun, 13 Jun 2010 15:42:16 GMT
Author: jeremias
Date: Sun Jun 13 15:42:16 2010
New Revision: 954244

URL: http://svn.apache.org/viewvc?rev=954244&view=rev
Log:
Bugzilla #49339:
Optimization for PostScript state handling in (E)PSDocumentGraphics2D.
Submitted by: Julien Aymé <julien.ayme.at.gmail.com>

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
    xmlgraphics/commons/trunk/status.xml

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java?rev=954244&r1=954243&r2=954244&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
Sun Jun 13 15:42:16 2010
@@ -231,15 +231,19 @@ public abstract class AbstractPSDocument
         }
 
         writePageHeader();
+        AffineTransform at;
         if ((this.viewportWidth != this.width
                 || this.viewportHeight != this.height)
                 && (this.viewportWidth > 0) && (this.viewportHeight >
0)){
-            gen.concatMatrix(this.width / this.viewportWidth, 0,
+            at = new AffineTransform(this.width / this.viewportWidth, 0,
                        0, -1 * (this.height / this.viewportHeight),
                        0, this.height);
         } else {
-            gen.concatMatrix(1, 0, 0, -1, 0, this.height);
+            at = new AffineTransform(1, 0, 0, -1, 0, this.height);
         }
+        // Do not use concatMatrix, since it alters PSGenerator current state
+        //gen.concatMatrix(at);
+        gen.writeln(gen.formatMatrix(at) + " " + gen.mapCommand("concat"));
         gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);
         this.pagePending = true;
     }

Modified: xmlgraphics/commons/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/status.xml?rev=954244&r1=954243&r2=954244&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/status.xml (original)
+++ xmlgraphics/commons/trunk/status.xml Sun Jun 13 15:42:16 2010
@@ -40,6 +40,9 @@
   </contexts>
   <changes>
     <release version="Trunk" date="n/a">
+      <action context="Code" dev="JM" type="update" fixes-bug="49339" due-to="Julien Aymé">
+        Optimization for PostScript state handling in (E)PSDocumentGraphics2D.
+      </action>
       <action context="Code" dev="JM" type="update" fixes-bug="49338" due-to="Julien Aymé">
         Using shorthand procedures for rectangles instead of the generic shape processor.
       </action>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message