xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spepp...@apache.org
Subject svn commit: r959327 - in /xmlgraphics/commons/branches/commons-1_4: ./ src/java/org/apache/xmlgraphics/image/codec/png/ src/java/org/apache/xmlgraphics/image/codec/util/ src/java/org/apache/xmlgraphics/image/loader/impl/ src/java/org/apache/xmlgraphics...
Date Wed, 30 Jun 2010 14:25:04 GMT
Author: spepping
Date: Wed Jun 30 14:25:03 2010
New Revision: 959327

URL: http://svn.apache.org/viewvc?rev=959327&view=rev
Log:
Merged changes from trunk

Added:
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/
      - copied from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/CMYKColorSpace.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/CMYKColorSpace.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/ColorConverter.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/ColorConverter.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/ColorExt.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/ColorExt.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/ColorUtil.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/ColorUtil.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/DefaultColorConverter.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/DefaultColorConverter.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/color/GrayScaleColorConverter.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/color/GrayScaleColorConverter.java
    xmlgraphics/commons/branches/commons-1_4/src/resources/org/apache/xmlgraphics/image/codec/
      - copied from r959309, xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/
    xmlgraphics/commons/branches/commons-1_4/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties
      - copied unchanged from r959309, xmlgraphics/commons/trunk/src/resources/org/apache/xmlgraphics/image/codec/Messages.properties
    xmlgraphics/commons/branches/commons-1_4/test/java/org/apache/xmlgraphics/image/codec/png/CodecResourcesTest.java
      - copied unchanged from r959309, xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/codec/png/CodecResourcesTest.java
Removed:
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ColorConverter.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ColorExt.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ColorUtil.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/DefaultColorConverter.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/GrayScaleColorConverter.java
Modified:
    xmlgraphics/commons/branches/commons-1_4/   (props changed)
    xmlgraphics/commons/branches/commons-1_4/build.properties
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/CMYKColorSpace.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/EPSDocumentGraphics2D.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
    xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/ps/PSState.java
    xmlgraphics/commons/branches/commons-1_4/status.xml

Propchange: xmlgraphics/commons/branches/commons-1_4/
------------------------------------------------------------------------------
    svn:mergeinfo = /xmlgraphics/commons/trunk:950384-959309

Modified: xmlgraphics/commons/branches/commons-1_4/build.properties
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/build.properties?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/build.properties (original)
+++ xmlgraphics/commons/branches/commons-1_4/build.properties Wed Jun 30 14:25:03 2010
@@ -41,4 +41,4 @@ version = 1.4
 ## enabled compatibility with non-Sun Java implementations such as
 ## Kaffe, IKVM, GCC/GCJ or even Apache Harmony (i.e. system which 
 ## are based on GNU Classpath, for example).
-# internal-codecs.disabled = false
\ No newline at end of file
+# internal-codecs.disabled = false

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/png/PNGImageDecoder.java
Wed Jun 30 14:25:03 2010
@@ -39,12 +39,12 @@ import java.io.DataInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.SequenceInputStream;
+import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.GregorianCalendar;
-import java.util.TimeZone;
 import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
+import java.util.TimeZone;
 import java.util.zip.Inflater;
 import java.util.zip.InflaterInputStream;
 
@@ -393,8 +393,8 @@ class PNGImage extends SimpleRenderedIma
                 String msg = PropertyUtil.getString("PNGImageDecoder0");
                 throw new RuntimeException(msg);
             }
-        } catch (Exception e) {
-            e.printStackTrace();
+        } catch (IOException ioe) {
+            ioe.printStackTrace();
             String msg = PropertyUtil.getString("PNGImageDecoder1");
             throw new RuntimeException(msg);
         }

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/codec/util/PropertyUtil.java
Wed Jun 30 14:25:03 2010
@@ -25,7 +25,7 @@ import org.apache.xmlgraphics.util.i18n.
 
 public class PropertyUtil {
     protected static final String RESOURCES =
-        "org.apache.xmlgraphics.image.codec.resources.Messages";
+        "org.apache.xmlgraphics.image.codec.Messages";
 
 
     protected static LocalizableSupport localizableSupport =

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawJPEG.java
Wed Jun 30 14:25:03 2010
@@ -39,7 +39,7 @@ import org.apache.xmlgraphics.image.load
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 import org.apache.xmlgraphics.image.loader.util.ImageUtil;
-import org.apache.xmlgraphics.java2d.CMYKColorSpace;
+import org.apache.xmlgraphics.java2d.color.CMYKColorSpace;
 import org.apache.xmlgraphics.util.MimeConstants;
 
 /**

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/CMYKColorSpace.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/CMYKColorSpace.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/CMYKColorSpace.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/CMYKColorSpace.java
Wed Jun 30 14:25:03 2010
@@ -23,6 +23,7 @@ import java.awt.color.ColorSpace;
 
 /**
  * This class represents an uncalibrated CMYK color space.
+ * @deprecated This class has been moved to the "color" subpackage.
  */
 public class CMYKColorSpace extends ColorSpace {
 

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/AbstractPSDocumentGraphics2D.java
Wed Jun 30 14:25:03 2010
@@ -27,6 +27,7 @@ import java.io.OutputStream;
 
 import org.apache.xmlgraphics.ps.DSCConstants;
 import org.apache.xmlgraphics.ps.PSGenerator;
+import org.apache.xmlgraphics.ps.PSProcSets;
 
 /**
  * This class is a wrapper for the <tt>PSGraphics2D</tt> that
@@ -196,6 +197,15 @@ public abstract class AbstractPSDocument
      */
     protected abstract void writePageTrailer() throws IOException;
 
+    /**
+     * Writes the ProcSets ending up in the prolog to the PostScript file. Override to add
your
+     * own ProcSets if so desired.
+     * @throws IOException In case an I/O error occurs
+     */
+    protected void writeProcSets() throws IOException {
+        PSProcSets.writeStdProcSet(gen);
+        PSProcSets.writeEPSProcSet(gen);
+    }
 
     /** {@inheritDoc} */
     public void preparePainting() {
@@ -231,15 +241,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/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/EPSDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/EPSDocumentGraphics2D.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/EPSDocumentGraphics2D.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/EPSDocumentGraphics2D.java
Wed Jun 30 14:25:03 2010
@@ -22,7 +22,6 @@ package org.apache.xmlgraphics.java2d.ps
 import java.io.IOException;
 
 import org.apache.xmlgraphics.ps.DSCConstants;
-import org.apache.xmlgraphics.ps.PSProcSets;
 
 /**
  * This class is a wrapper for the <tt>AbstractPSDocumentGraphics2D</tt> that
@@ -69,8 +68,7 @@ public class EPSDocumentGraphics2D exten
 
         //Prolog
         gen.writeDSCComment(DSCConstants.BEGIN_PROLOG);
-        PSProcSets.writeStdProcSet(gen);
-        PSProcSets.writeEPSProcSet(gen);
+        writeProcSets();
         if (customTextHandler instanceof PSTextHandler) {
             ((PSTextHandler)customTextHandler).writeSetup();
         }

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/java2d/ps/PSDocumentGraphics2D.java
Wed Jun 30 14:25:03 2010
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.OutputStream;
 
 import org.apache.xmlgraphics.ps.DSCConstants;
-import org.apache.xmlgraphics.ps.PSProcSets;
 
 /**
  * This class is a wrapper for the <tt>PSGraphics2D</tt> that
@@ -104,8 +103,7 @@ public class PSDocumentGraphics2D extend
 
         //Setup
         gen.writeDSCComment(DSCConstants.BEGIN_SETUP);
-        PSProcSets.writeStdProcSet(gen);
-        PSProcSets.writeEPSProcSet(gen);
+        writeProcSets();
         if (customTextHandler instanceof PSTextHandler) {
             ((PSTextHandler)customTextHandler).writeSetup();
         }

Modified: xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/ps/PSState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/ps/PSState.java?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/ps/PSState.java
(original)
+++ xmlgraphics/commons/branches/commons-1_4/src/java/org/apache/xmlgraphics/ps/PSState.java
Wed Jun 30 14:25:03 2010
@@ -69,6 +69,8 @@ public class PSState implements Serializ
             this.transformConcatList.addAll(org.transformConcatList);
         }
         this.linecap = org.linecap;
+        this.linejoin = org.linejoin;
+        this.miterLimit = org.miterLimit;
         this.linewidth = org.linewidth;
         this.dashpattern = org.dashpattern;
         this.color = org.color;

Modified: xmlgraphics/commons/branches/commons-1_4/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/commons-1_4/status.xml?rev=959327&r1=959326&r2=959327&view=diff
==============================================================================
--- xmlgraphics/commons/branches/commons-1_4/status.xml (original)
+++ xmlgraphics/commons/branches/commons-1_4/status.xml Wed Jun 30 14:25:03 2010
@@ -40,8 +40,14 @@
   </contexts>
   <changes>
     <release version="1.4" date="11 June 2010">
+      <action context="Code" dev="JM" type="fix" fixes-bug="49364" due-to="Julien Aymé">
+        Two properties didn't get copied in copy constructor of PSState.
+      </action>
+      <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.
+        PS output: Using shorthand procedures for rectangles instead of the generic shape
processor.
       </action>
       <action context="Code" dev="JM" type="update" fixes-bug="49337" due-to="Julien Aymé">
         Moved method disableClipping from AbstractPSDocumentGraphics2D to PSGraphics2D.



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


Mime
View raw message