You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2009/08/15 11:12:47 UTC

svn commit: r804444 - in /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics: java2d/ps/PSGraphics2D.java ps/PSGenerator.java ps/PSPatternStorage.java

Author: jeremias
Date: Sat Aug 15 09:12:46 2009
New Revision: 804444

URL: http://svn.apache.org/viewvc?rev=804444&view=rev
Log:
Bugzilla #46583:
Made tiling patterns DSC-compatible.
Submitted by: Jiří Kunhart <kunhart.at.kadel.cz>

Removed:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSPatternStorage.java
Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java?rev=804444&r1=804443&r2=804444&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/java2d/ps/PSGraphics2D.java Sat Aug 15 09:12:46 2009
@@ -480,12 +480,9 @@
             if (fill) {
                 try {
                     // create pattern with texture and use it for filling of a graphics object
-                    PSTilingPattern psTilingPattern = new PSTilingPattern(null,
+                    PSTilingPattern psTilingPattern = new PSTilingPattern("Pattern1",
                             (TexturePaint)paint, 0, 0, 3, null);
-                    if (!gen.getPatternStorage().checkAndStore(psTilingPattern)) {
-                        //TODO This violates the DSC specification!
-                        gen.write(psTilingPattern.toString());
-                    }
+                    gen.write(psTilingPattern.toString());
                     gen.writeln("/Pattern setcolorspace");
                     gen.writeln(psTilingPattern.getName() + " setcolor");
                 }

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java?rev=804444&r1=804443&r2=804444&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/PSGenerator.java Sat Aug 15 09:12:46 2009
@@ -71,12 +71,6 @@
     private StringBuffer tempBuffer = new StringBuffer(256);
 
     /**
-     * The pattern storage which allows to define pattern only once but use it how many
-     * times we need in PS document.
-     */
-    private PSPatternStorage patternStorage = new PSPatternStorage();
-
-    /**
      * Creates a new instance.
      * @param out the OutputStream to write the generated PostScript code to
      */
@@ -707,13 +701,4 @@
         return getResourceTracker().isResourceSupplied(res);
     }
 
-    /**
-     * Gets a pattern storage.
-     * <p>
-     * IMPORTANT: To be treated as provisional! The current approach violates the DSC specification!
-     * @return the pattern storage
-     */
-    public PSPatternStorage getPatternStorage() {
-        return patternStorage;
-    }
-}
\ No newline at end of file
+ }
\ No newline at end of file



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