diff options
Diffstat (limited to 'src')
3 files changed, 18 insertions, 4 deletions
diff --git a/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2D.java b/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2D.java index fe2d6a12a..674b63941 100644 --- a/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2D.java +++ b/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2D.java @@ -95,6 +95,14 @@ public class PCLGraphics2D extends AbstractGraphics2D { } /** + * 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 */ diff --git a/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2DAdapter.java b/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2DAdapter.java index 665eb6d6c..df9fb8589 100644 --- a/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2DAdapter.java +++ b/src/sandbox/org/apache/fop/render/pcl/PCLGraphics2DAdapter.java @@ -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); diff --git a/src/sandbox/org/apache/fop/render/pcl/PCLRendererContext.java b/src/sandbox/org/apache/fop/render/pcl/PCLRendererContext.java index 2f77dd4aa..462abfa48 100644 --- a/src/sandbox/org/apache/fop/render/pcl/PCLRendererContext.java +++ b/src/sandbox/org/apache/fop/render/pcl/PCLRendererContext.java @@ -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 |