org.apache.fop.render.ps
public abstract class AbstractPSTranscoder extends AbstractFOPTranscoder
Two transcoding hints (KEY_WIDTH and KEY_HEIGHT) can be used to respectively specify the image width and the image height. If only one of these keys is specified, the transcoder preserves the aspect ratio of the original image.
The KEY_BACKGROUND_COLOR defines the background color to use for opaque image formats, or the background color that may be used for image formats that support alpha channel.
The KEY_AOI represents the area of interest to paint in device space.
Three additional transcoding hints that act on the SVG processor can be specified:
KEY_LANGUAGE to set the default language to use (may be used by a <switch> SVG element for example), KEY_USER_STYLESHEET_URI to fix the URI of a user stylesheet, and KEY_PIXEL_TO_MM to specify the pixel to millimeter conversion factor.
AbstractFOPTranscoder.FOPErrorHandler, AbstractFOPTranscoder.FOPTranscoderUserAgent
Modifier and Type | Field and Description |
---|---|
protected org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D |
graphics |
KEY_STROKE_TEXT, userAgent, VALUE_FORMAT_OFF, VALUE_FORMAT_ON
builder, ctx, curAOI, curTxf, DEFAULT_ALLOWED_SCRIPT_TYPES, DEFAULT_DEFAULT_FONT_FAMILY, height, KEY_ALLOWED_SCRIPT_TYPES, KEY_ALTERNATE_STYLESHEET, KEY_AOI, KEY_CONSTRAIN_SCRIPT_ORIGIN, KEY_DEFAULT_FONT_FAMILY, KEY_EXECUTE_ONLOAD, KEY_HEIGHT, KEY_LANGUAGE, KEY_MAX_HEIGHT, KEY_MAX_WIDTH, KEY_MEDIA, KEY_PIXEL_TO_MM, KEY_PIXEL_UNIT_TO_MILLIMETER, KEY_SNAPSHOT_TIME, KEY_USER_STYLESHEET_URI, KEY_WIDTH, root, width
Constructor and Description |
---|
AbstractPSTranscoder()
Constructs a new AbstractPSTranscoder.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.batik.bridge.BridgeContext |
createBridgeContext() |
protected abstract org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D |
createDocumentGraphics2D() |
protected void |
transcode(org.w3c.dom.Document document,
java.lang.String uri,
org.apache.batik.transcoder.TranscoderOutput output)
Transcodes the specified Document as an image in the specified output.
|
createDocumentFactory, createUserAgent, getLogger, isTextStroked, setEntityResolver, setLogger
createBridgeContext, createBridgeContext, getCanvasGraphicsNode, setImageSize, transcode
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
protected org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D graphics
public AbstractPSTranscoder()
protected abstract org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D createDocumentGraphics2D()
protected void transcode(org.w3c.dom.Document document, java.lang.String uri, org.apache.batik.transcoder.TranscoderOutput output) throws org.apache.batik.transcoder.TranscoderException
transcode
in class org.apache.batik.transcoder.SVGAbstractTranscoder
document
- the document to transcodeuri
- the uri of the document or null if anyoutput
- the ouput where to transcodeorg.apache.batik.transcoder.TranscoderException
- if an error occured while transcodingprotected org.apache.batik.bridge.BridgeContext createBridgeContext()
createBridgeContext
in class org.apache.batik.transcoder.SVGAbstractTranscoder
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.