public abstract class AbstractFOPTranscoder extends org.apache.batik.transcoder.SVGAbstractTranscoder implements Configurable
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractFOPTranscoder.FOPErrorHandler
This is the default transcoder error handler for FOP.
|
protected class |
AbstractFOPTranscoder.FOPTranscoderUserAgent
A user agent implementation for FOP's Transcoders.
|
Modifier and Type | Field and Description |
---|---|
static org.apache.batik.transcoder.TranscodingHints.Key |
KEY_AUTO_FONTS
The key is used to specify whether the available fonts should be automatically
detected.
|
static org.apache.batik.transcoder.TranscodingHints.Key |
KEY_DEVICE_RESOLUTION
The key is used to specify the resolution for on-the-fly images generated
due to complex effects like gradients and filters.
|
static org.apache.batik.transcoder.TranscodingHints.Key |
KEY_STROKE_TEXT
The key to specify whether to stroke text instead of using text
operations.
|
static Boolean |
VALUE_FORMAT_OFF
The value to turn off text stroking.
|
static Boolean |
VALUE_FORMAT_ON
The value to turn on text stroking.
|
builder, ctx, curAOI, curTxf, DEFAULT_ALLOWED_SCRIPT_TYPES, DEFAULT_DEFAULT_FONT_FAMILY, height, KEY_ALLOW_EXTERNAL_RESOURCES, 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, userAgent, width
Constructor and Description |
---|
AbstractFOPTranscoder()
Constructs a new FOP-style transcoder.
|
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration cfg) |
protected org.apache.batik.dom.util.DocumentFactory |
createDocumentFactory(DOMImplementation domImpl,
String parserClassname)
Creates a
DocumentFactory that is used to create an SVG DOM
tree. |
protected AbstractFOPTranscoder.FOPTranscoderUserAgent |
createUserAgent()
Creates and returns the default user agent for this transcoder.
|
protected boolean |
getAutoFontsDefault()
Returns the default value for the KEY_AUTO_FONTS value.
|
protected float |
getDeviceResolution()
Returns the device resolution that has been set up.
|
protected Configuration |
getEffectiveConfiguration()
Returns the effective configuration for the transcoder.
|
protected org.apache.xmlgraphics.image.loader.ImageManager |
getImageManager()
Returns the ImageManager to be used by the transcoder.
|
protected org.apache.xmlgraphics.image.loader.ImageSessionContext |
getImageSessionContext()
Returns the ImageSessionContext to be used by the transcoder.
|
protected org.apache.commons.logging.Log |
getLogger()
Returns the logger associated with this transcoder.
|
protected boolean |
isTextStroked()
Indicates whether text should be stroked rather than painted using text operators.
|
void |
setEntityResolver(EntityResolver resolver)
Sets the EntityResolver that should be used when building SVG documents.
|
void |
setLogger(org.apache.commons.logging.Log logger)
Sets the logger.
|
protected void |
setupImageInfrastructure(String baseURI)
Sets up the image infrastructure (the image loading framework).
|
createBridgeContext, createBridgeContext, createBridgeContext, getCanvasGraphicsNode, setImageSize, transcode, transcode
addTranscodingHint, getErrorHandler, getTranscodingHints, removeTranscodingHint, setErrorHandler, setTranscodingHints, setTranscodingHints
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_DEVICE_RESOLUTION
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_STROKE_TEXT
public static final org.apache.batik.transcoder.TranscodingHints.Key KEY_AUTO_FONTS
public static final Boolean VALUE_FORMAT_ON
public static final Boolean VALUE_FORMAT_OFF
public AbstractFOPTranscoder()
protected AbstractFOPTranscoder.FOPTranscoderUserAgent createUserAgent()
createUserAgent
in class org.apache.batik.transcoder.SVGAbstractTranscoder
public void setLogger(org.apache.commons.logging.Log logger)
logger
- the loggerpublic void setEntityResolver(EntityResolver resolver)
resolver
- the resolverpublic void configure(Configuration cfg) throws ConfigurationException
configure
in interface Configurable
cfg
- the configurationConfigurationException
- if not caughtprotected boolean getAutoFontsDefault()
protected Configuration getEffectiveConfiguration()
protected final org.apache.commons.logging.Log getLogger()
protected org.apache.batik.dom.util.DocumentFactory createDocumentFactory(DOMImplementation domImpl, String parserClassname)
DocumentFactory
that is used to create an SVG DOM
tree. The specified DOM Implementation is ignored and the Batik
SVG DOM Implementation is automatically used.createDocumentFactory
in class org.apache.batik.transcoder.SVGAbstractTranscoder
domImpl
- the DOM Implementation (not used)parserClassname
- the XML parser classnameprotected boolean isTextStroked()
protected float getDeviceResolution()
protected org.apache.xmlgraphics.image.loader.ImageManager getImageManager()
protected org.apache.xmlgraphics.image.loader.ImageSessionContext getImageSessionContext()
protected void setupImageInfrastructure(String baseURI)
baseURI
- the base URI of the current documentCopyright © 2022 Apache Software Foundation. All rights reserved.