]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fox:disable-clipping on the i-f-o or e-g can be used to perform more painting operati...
authorJeremias Maerki <jeremias@apache.org>
Thu, 4 May 2006 07:24:18 +0000 (07:24 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 4 May 2006 07:24:18 +0000 (07:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@399582 13f79535-47bb-0310-9956-ffa450edef68

src/sandbox/org/apache/fop/render/pcl/PCLGraphics2D.java
src/sandbox/org/apache/fop/render/pcl/PCLGraphics2DAdapter.java
src/sandbox/org/apache/fop/render/pcl/PCLRendererContext.java

index fe2d6a12af99236d081179844e200ed2fd6f1df3..674b63941e57c703afbcf168b7b2b9f9393ba2fb 100644 (file)
@@ -94,6 +94,14 @@ public class PCLGraphics2D extends AbstractGraphics2D {
         this.gc = c;
     }
 
+    /**
+     * Allows to disable all clipping operations.
+     * @param value true if clipping should be disabled.
+     */
+    public void setClippingDisabled(boolean value) {
+        this.clippingDisabled = value;
+    }
+    
     /**
      * Central handler for IOExceptions for this class.
      * @param ioe IOException to handle
index 665eb6d6c4061202bf0822664b5577ae001c79fd..df9fb85895c4eafb22ed02542c11e3246b1087a5 100644 (file)
@@ -74,6 +74,7 @@ public class PCLGraphics2DAdapter extends AbstractGraphics2DAdapter {
 
                 PCLGraphics2D graphics = new PCLGraphics2D(tempGen);
                 graphics.setGraphicContext(ctx);
+                graphics.setClippingDisabled(pclContext.isClippingDisabled());
                 Rectangle2D area = new Rectangle2D.Double(0.0, 0.0, imw, imh);
                 painter.paint(graphics, area);
                 
index 2f77dd4aa3a986917df3097956f9daba16a5f795..462abfa487405aa50db78cd8a0e1ff4b53d0d63d 100644 (file)
@@ -18,9 +18,6 @@
 
 package org.apache.fop.render.pcl;
 
-import java.util.Map;
-
-import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.fop.fo.extensions.ExtensionElementMapping;
 import org.apache.fop.render.RendererContext;
 import org.apache.fop.util.QName;
@@ -54,7 +51,15 @@ public class PCLRendererContext extends RendererContext.RendererContextWrapper {
     public boolean paintAsBitmap() {
         QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode");
         return getForeignAttributes() != null 
-             && "bitmap".equals(getForeignAttributes().get(qName));
+             && "bitmap".equalsIgnoreCase((String)getForeignAttributes().get(qName));
     }
+    
+    /** @return true if clipping is disabled inside the PCLGraphics2D. */
+    public boolean isClippingDisabled() {
+        QName qName = new QName(ExtensionElementMapping.URI, null, "disable-clipping");
+        return getForeignAttributes() != null 
+             && "true".equalsIgnoreCase((String)getForeignAttributes().get(qName));
+    }
+    
 
 }
\ No newline at end of file