|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.batik.bridge.AbstractSVGBridge
org.apache.batik.bridge.AnimatableSVGBridge
org.apache.batik.bridge.AbstractGraphicsNodeBridge
org.apache.batik.bridge.SVGImageElementBridge
public class SVGImageElementBridge
Bridge class for the <image> element.
| Nested 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 org.w3c.dom.svg.SVGDocument |
imgDocument
|
protected EventListener |
listener
|
protected BridgeContext |
subCtx
|
| Fields inherited from class org.apache.batik.bridge.AbstractGraphicsNodeBridge |
|---|
bbox, bboxShape, isSVG12, node, unitContext |
| Fields inherited from class org.apache.batik.bridge.AnimatableSVGBridge |
|---|
ctx, e, targetListeners |
| Fields inherited from interface org.apache.batik.dom.svg.SVGContext |
|---|
PERCENTAGE_FONT_SIZE, PERCENTAGE_VIEWPORT_HEIGHT, PERCENTAGE_VIEWPORT_SIZE, PERCENTAGE_VIEWPORT_WIDTH |
| 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_BROKEN, ERR_URI_IMAGE_INVALID, ERR_URI_IO, ERR_URI_MALFORMED, ERR_URI_REFERENCE_A_DOCUMENT, ERR_URI_UNSECURE, ERR_XLINK_HREF_CIRCULAR_DEPENDENCIES, URI_IMAGE_ERROR |
| Constructor Summary | |
|---|---|
SVGImageElementBridge()
Constructs a new bridge for the <image> element. |
|
| Method Summary | |
|---|---|
protected GraphicsNode |
buildImageGraphicsNode(BridgeContext ctx,
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,
Element e)
Creates a graphics node using the specified BridgeContext and for the specified element. |
protected GraphicsNode |
createImageGraphicsNode(BridgeContext ctx,
Element e,
ParsedURL purl)
|
protected GraphicsNode |
createRasterImageNode(BridgeContext ctx,
Element e,
Filter img,
ParsedURL purl)
Returns a GraphicsNode that represents an raster image in JPEG or PNG format. |
protected GraphicsNode |
createSVGImageNode(BridgeContext ctx,
Element e,
org.w3c.dom.svg.SVGDocument imgDocument)
Returns a GraphicsNode that represents a svg document as an image. |
void |
dispose()
Disposes this BridgeUpdateHandler and releases all resources. |
protected static org.apache.xmlgraphics.java2d.color.ICCColorSpaceWithIntent |
extractColorSpace(Element element,
BridgeContext ctx)
Analyzes the color-profile property and builds an ICCColorSpaceExt object from it. |
protected static Rectangle2D |
getImageBounds(BridgeContext ctx,
Element element)
Returns the bounds of the specified image element. |
Bridge |
getInstance()
Returns a new instance of this bridge. |
String |
getLocalName()
Returns 'image'. |
void |
handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
Invoked when the animated value of an animatable attribute has changed. |
protected void |
handleCSSPropertyChanged(int property)
Invoked for each CSS property that has changed. |
protected void |
initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
This method is invoked during the build phase if the document is dynamic. |
protected static void |
initializeViewport(BridgeContext ctx,
Element e,
GraphicsNode node,
float[] vb,
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(Element e,
ParsedURL purl)
|
protected void |
rebuildImageNode()
|
protected void |
updateImageBounds()
|
| Methods inherited from class org.apache.batik.bridge.AnimatableSVGBridge |
|---|
addTargetListener, fireBaseAttributeListeners, removeTargetListener |
| 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 org.w3c.dom.svg.SVGDocument imgDocument
protected EventListener listener
protected BridgeContext subCtx
protected boolean hitCheckChildren
| Constructor Detail |
|---|
public SVGImageElementBridge()
| Method Detail |
|---|
public String getLocalName()
public Bridge getInstance()
getInstance in interface BridgegetInstance in interface GraphicsNodeBridgegetInstance in class AbstractSVGBridge
public GraphicsNode createGraphicsNode(BridgeContext ctx,
Element e)
createGraphicsNode in interface GraphicsNodeBridgecreateGraphicsNode in class AbstractGraphicsNodeBridgectx - the bridge context to usee - the element that describes the graphics node to build
protected GraphicsNode buildImageGraphicsNode(BridgeContext ctx,
Element e)
ctx - : the bridge context to usee - the element that describes the graphics node to build
protected GraphicsNode createImageGraphicsNode(BridgeContext ctx,
Element e,
ParsedURL purl)
protected SVGImageElementBridge.ProtectedStream openStream(Element e,
ParsedURL purl)
throws IOException
IOExceptionprotected GraphicsNode instantiateGraphicsNode()
ImageNode.
instantiateGraphicsNode in class AbstractGraphicsNodeBridgepublic boolean isComposite()
protected void initializeDynamicSupport(BridgeContext ctx,
Element e,
GraphicsNode node)
initializeDynamicSupport in class AbstractGraphicsNodeBridgepublic void handleAnimatedAttributeChanged(AnimatedLiveAttributeValue alav)
handleAnimatedAttributeChanged in interface BridgeUpdateHandlerhandleAnimatedAttributeChanged in class AbstractGraphicsNodeBridgeprotected void updateImageBounds()
protected void rebuildImageNode()
protected void handleCSSPropertyChanged(int property)
handleCSSPropertyChanged in class AbstractGraphicsNodeBridge
protected GraphicsNode createRasterImageNode(BridgeContext ctx,
Element e,
Filter img,
ParsedURL purl)
ctx - the bridge contexte - the image elementimg - the image to use in creating the graphics node
protected GraphicsNode createSVGImageNode(BridgeContext ctx,
Element e,
org.w3c.dom.svg.SVGDocument imgDocument)
ctx - the bridge contexte - the image elementimgDocument - the SVG document that represents the imagepublic void dispose()
AbstractGraphicsNodeBridge
dispose in interface BridgeUpdateHandlerdispose in class AbstractGraphicsNodeBridge
protected static void initializeViewport(BridgeContext ctx,
Element e,
GraphicsNode node,
float[] vb,
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 element
protected static org.apache.xmlgraphics.java2d.color.ICCColorSpaceWithIntent extractColorSpace(Element element,
BridgeContext ctx)
element - the element with the color-profile propertyctx - the bridge context
protected static Rectangle2D getImageBounds(BridgeContext ctx,
Element element)
ctx - the bridge contextelement - the image element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||