org.apache.batik.bridge

Class SVGPatternElementBridge

public class SVGPatternElementBridge extends AnimatableGenericSVGBridge implements PaintBridge, ErrorConstants

Bridge class for the <pattern> element.
Nested Class Summary
static classSVGPatternElementBridge.PatternGraphicsNode
Constructor Summary
SVGPatternElementBridge()
Constructs a new SVGPatternElementBridge.
Method Summary
PaintcreatePaint(BridgeContext ctx, Element patternElement, Element paintedElement, GraphicsNode paintedNode, float opacity)
Creates a Paint according to the specified parameters.
protected static RootGraphicsNodeextractLocalPatternContent(Element e, BridgeContext ctx)
Returns the content of the specified pattern element or null if any.
protected static RootGraphicsNodeextractPatternContent(Element patternElement, BridgeContext ctx)
Returns the content of the specified pattern element.
StringgetLocalName()
Returns 'pattern'.

Constructor Detail

SVGPatternElementBridge

public SVGPatternElementBridge()
Constructs a new SVGPatternElementBridge.

Method Detail

createPaint

public Paint createPaint(BridgeContext ctx, Element patternElement, Element paintedElement, GraphicsNode paintedNode, float opacity)
Creates a Paint according to the specified parameters.

Parameters: ctx the bridge context to use patternElement the pattern element that defines a Paint paintedElement the element referencing the paint paintedNode the graphics node on which the Paint will be applied opacity the opacity of the Paint to create

extractLocalPatternContent

protected static RootGraphicsNode extractLocalPatternContent(Element e, BridgeContext ctx)
Returns the content of the specified pattern element or null if any.

Parameters: e the pattern element ctx the bridge context

extractPatternContent

protected static RootGraphicsNode extractPatternContent(Element patternElement, BridgeContext ctx)
Returns the content of the specified pattern element. The content of the pattern can be specified as children of the patternElement or children of one of its 'ancestor' (linked with the xlink:href attribute).

Parameters: patternElement the gradient element ctx the bridge context to use

getLocalName

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