org.apache.batik.bridge

Class SVGFilterElementBridge

public class SVGFilterElementBridge extends AnimatableGenericSVGBridge implements FilterBridge, ErrorConstants

Bridge class for the <filter> element.
Field Summary
protected static ColorTRANSPARENT_BLACK
Transparent black color.
Constructor Summary
SVGFilterElementBridge()
Constructs a new bridge for the <filter> element.
Method Summary
protected static FilterbuildFilterPrimitives(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, Filter in, Map filterNodeMap, BridgeContext ctx)
Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created.
protected static FilterbuildLocalFilterPrimitives(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, Filter in, Map filterNodeMap, BridgeContext ctx)
Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created or 'in' if no filter primitive has been specified.
protected static FiltercreateEmptyFilter(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, BridgeContext ctx)
Creates a new returns a new filter that fills its output with transparent black.
FiltercreateFilter(BridgeContext ctx, Element filterElement, Element filteredElement, GraphicsNode filteredNode)
Creates a Filter according to the specified parameters.
StringgetLocalName()
Returns 'filter'.

Field Detail

TRANSPARENT_BLACK

protected static final Color TRANSPARENT_BLACK
Transparent black color.

Constructor Detail

SVGFilterElementBridge

public SVGFilterElementBridge()
Constructs a new bridge for the <filter> element.

Method Detail

buildFilterPrimitives

protected static Filter buildFilterPrimitives(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, Filter in, Map filterNodeMap, BridgeContext ctx)
Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created. Filter primitives can be children of the filter or defined on one of its 'ancestor' (linked with the xlink:href attribute).

Parameters: filterElement the filter element filterRegion the filter chain region filteredElement the filtered element filteredNode the filtered node in the input Filter filterNodeMap the map used by named filter primitives ctx the bridge context

Returns: the last filter primitive created

buildLocalFilterPrimitives

protected static Filter buildLocalFilterPrimitives(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, Filter in, Map filterNodeMap, BridgeContext ctx)
Builds the filter primitives of filter chain of the specified filter element and returns the last filter primitive created or 'in' if no filter primitive has been specified.

Parameters: filterElement the filter element filterRegion the filter chain region filteredElement the filtered element filteredNode the filtered node in the input Filter filterNodeMap the map used by named filter primitives ctx the bridge context

Returns: the last filter primitive created or 'in'

createEmptyFilter

protected static Filter createEmptyFilter(Element filterElement, Rectangle2D filterRegion, Element filteredElement, GraphicsNode filteredNode, BridgeContext ctx)
Creates a new returns a new filter that fills its output with transparent black. This is used when a <filter> element has no filter primitive children.

createFilter

public Filter createFilter(BridgeContext ctx, Element filterElement, Element filteredElement, GraphicsNode filteredNode)
Creates a Filter according to the specified parameters.

Parameters: ctx the bridge context to use filterElement the element that defines the filter filteredElement the element that references the filter element filteredNode the graphics node to filter

getLocalName

public String getLocalName()
Returns 'filter'.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.