1 17 18 19 20 package org.apache.fop.render.pcl; 21 22 import org.apache.fop.fo.extensions.ExtensionElementMapping; 23 import org.apache.fop.render.RendererContext; 24 import org.apache.fop.util.QName; 25 26 30 public class PCLRendererContext extends RendererContext.RendererContextWrapper { 31 32 38 public static PCLRendererContext wrapRendererContext(RendererContext context) { 39 PCLRendererContext pcli = new PCLRendererContext(context); 40 return pcli; 41 } 42 43 47 public PCLRendererContext(RendererContext context) { 48 super(context); 49 } 50 51 52 public boolean paintAsBitmap() { 53 QName qName = new QName(ExtensionElementMapping.URI, null, "conversion-mode"); 54 return getForeignAttributes() != null 55 && "bitmap".equalsIgnoreCase((String )getForeignAttributes().get(qName)); 56 } 57 58 59 public boolean isClippingDisabled() { 60 QName qName = new QName(ExtensionElementMapping.URI, null, "disable-clipping"); 61 return getForeignAttributes() != null 62 && "true".equalsIgnoreCase((String )getForeignAttributes().get(qName)); 63 } 64 65 public boolean isSourceTransparency() { 66 QName qName = new QName(ExtensionElementMapping.URI, null, "source-transparency"); 67 return getForeignAttributes() != null 68 && "true".equalsIgnoreCase((String )getForeignAttributes().get(qName)); 69 } 70 71 72 } | Popular Tags |