|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.bridge.AbstractSVGBridge | +--org.apache.batik.bridge.AbstractGraphicsNodeBridge | +--org.apache.batik.bridge.SVGImageElementBridge
Bridge class for the <image> element.
Inner Class Summary | |
protected static class |
SVGImageElementBridge.ForwardEventListener
A simple DOM listener to forward events from the SVG image document to the original document. |
static class |
SVGImageElementBridge.ProtectedStream
|
Field Summary | |
protected boolean |
hitCheckChildren
|
protected SVGDocument |
imgDocument
|
Fields inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
ctx, e, node |
Fields inherited from interface org.apache.batik.bridge.ErrorConstants |
ERR_ATTRIBUTE_MISSING, ERR_ATTRIBUTE_VALUE_MALFORMED, ERR_CSS_LENGTH_NEGATIVE, ERR_CSS_URI_BAD_TARGET, ERR_LENGTH_NEGATIVE, ERR_URI_BAD_TARGET, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, MSG_BROKEN_LINK_TITLE |
Constructor Summary | |
SVGImageElementBridge()
Constructs a new bridge for the <image> element. |
Method Summary | |
protected GraphicsNode |
buildImageGraphicsNode(BridgeContext ctx,
org.w3c.dom.Element e)
Create a Graphics node according to the resource pointed by the href : RasterImageNode for bitmaps, CompositeGraphicsNode for svg files. |
GraphicsNode |
createGraphicsNode(BridgeContext ctx,
org.w3c.dom.Element e)
Creates a graphics node using the specified BridgeContext and for the specified element. |
protected GraphicsNode |
createImageGraphicsNode(BridgeContext ctx,
org.w3c.dom.Element e,
ParsedURL purl)
|
protected static GraphicsNode |
createRasterImageNode(BridgeContext ctx,
org.w3c.dom.Element e,
Filter img)
Returns a GraphicsNode that represents an raster image in JPEG or PNG format. |
protected static GraphicsNode |
createSVGImageNode(BridgeContext ctx,
org.w3c.dom.Element e,
SVGDocument imgDocument)
Returns a GraphicsNode that represents a svg document as an image. |
protected static ICCColorSpaceExt |
extractColorSpace(org.w3c.dom.Element element,
BridgeContext ctx)
Analyzes the color-profile property and builds an ICCColorSpaceExt object from it. |
protected static java.awt.geom.Rectangle2D |
getImageBounds(BridgeContext ctx,
org.w3c.dom.Element element)
Returns the bounds of the specified image element. |
Bridge |
getInstance()
Returns a new instance of this bridge. |
java.lang.String |
getLocalName()
Returns 'image'. |
protected void |
handleCSSPropertyChanged(int property)
Invoked for each CSS property that has changed. |
void |
handleDOMAttrModifiedEvent(org.w3c.dom.events.MutationEvent evt)
Invoked when an MutationEvent of type 'DOMAttrModified' is fired. |
protected void |
initializeDynamicSupport(BridgeContext ctx,
org.w3c.dom.Element e,
GraphicsNode node)
This method is invoked during the build phase if the document is dynamic. |
protected static void |
initializeViewport(BridgeContext ctx,
org.w3c.dom.Element e,
GraphicsNode node,
float[] vb,
java.awt.geom.Rectangle2D bounds)
Initializes according to the specified element, the specified graphics node with the specified bounds. |
protected GraphicsNode |
instantiateGraphicsNode()
Creates an ImageNode. |
boolean |
isComposite()
Returns false as image is not a container. |
protected SVGImageElementBridge.ProtectedStream |
openStream(org.w3c.dom.Element e,
ParsedURL purl)
|
protected void |
rebuildImageNode()
|
protected void |
updateImageBounds()
|
Methods inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
buildGraphicsNode, dispose, getBBox, getCTM, getDisplay, getFontSize, getGlobalTransform, getPixelToMM, getPixelUnitToMillimeter, getScreenTransform, getViewportHeight, getViewportWidth, handleCSSEngineEvent, handleDOMCharacterDataModified, handleDOMNodeInsertedEvent, handleDOMNodeRemovedEvent, handleGeometryChanged, setScreenTransform |
Methods inherited from class org.apache.batik.bridge.AbstractSVGBridge |
getNamespaceURI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.batik.bridge.Bridge |
getNamespaceURI |
Field Detail |
protected SVGDocument imgDocument
protected boolean hitCheckChildren
Constructor Detail |
public SVGImageElementBridge()
Method Detail |
public java.lang.String getLocalName()
public Bridge getInstance()
getInstance
in class AbstractSVGBridge
public GraphicsNode createGraphicsNode(BridgeContext ctx, org.w3c.dom.Element e)
createGraphicsNode
in class AbstractGraphicsNodeBridge
ctx
- the bridge context to usee
- the element that describes the graphics node to buildprotected GraphicsNode buildImageGraphicsNode(BridgeContext ctx, org.w3c.dom.Element e)
ctx
- : the bridge context to usee
- the element that describes the graphics node to buildprotected GraphicsNode createImageGraphicsNode(BridgeContext ctx, org.w3c.dom.Element e, ParsedURL purl)
protected SVGImageElementBridge.ProtectedStream openStream(org.w3c.dom.Element e, ParsedURL purl) throws java.io.IOException
protected GraphicsNode instantiateGraphicsNode()
instantiateGraphicsNode
in class AbstractGraphicsNodeBridge
public boolean isComposite()
protected void initializeDynamicSupport(BridgeContext ctx, org.w3c.dom.Element e, GraphicsNode node)
initializeDynamicSupport
in class AbstractGraphicsNodeBridge
public void handleDOMAttrModifiedEvent(org.w3c.dom.events.MutationEvent evt)
handleDOMAttrModifiedEvent
in class AbstractGraphicsNodeBridge
protected void updateImageBounds()
protected void rebuildImageNode()
protected void handleCSSPropertyChanged(int property)
handleCSSPropertyChanged
in class AbstractGraphicsNodeBridge
protected static GraphicsNode createRasterImageNode(BridgeContext ctx, org.w3c.dom.Element e, Filter img)
ctx
- the bridge contexte
- the image elementuriStr
- the uri of the imageprotected static GraphicsNode createSVGImageNode(BridgeContext ctx, org.w3c.dom.Element e, SVGDocument imgDocument)
ctx
- the bridge contexte
- the image elementimgDocument
- the SVG document that represents the imageprotected static void initializeViewport(BridgeContext ctx, org.w3c.dom.Element e, GraphicsNode node, float[] vb, java.awt.geom.Rectangle2D bounds)
ctx
- the bridge contexte
- the image element that defines the propertiesnode
- the graphics nodevb
- the implicit viewBox definitionbounds
- the bounds of the image elementprotected static ICCColorSpaceExt extractColorSpace(org.w3c.dom.Element element, BridgeContext ctx)
element
- the element with the color-profile propertyctx
- the bridge contextprotected static java.awt.geom.Rectangle2D getImageBounds(BridgeContext ctx, org.w3c.dom.Element element)
ctx
- the bridge contextelement
- the image element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |