org.apache.batik.bridge
public abstract class AbstractSVGGradientElementBridge extends AnimatableGenericSVGBridge implements PaintBridge, ErrorConstants
Nested Class Summary | |
---|---|
static class | AbstractSVGGradientElementBridge.Stop
This class represents a gradient <stop> element. |
static class | AbstractSVGGradientElementBridge.SVGStopElementBridge
Bridge class for the gradient <stop> element. |
Constructor Summary | |
---|---|
protected | AbstractSVGGradientElementBridge()
Constructs a new AbstractSVGGradientElementBridge. |
Method Summary | |
---|---|
protected abstract Paint | buildGradient(Element paintElement, Element paintedElement, GraphicsNode paintedNode, MultipleGradientPaint.CycleMethodEnum spreadMethod, MultipleGradientPaint.ColorSpaceEnum colorSpace, AffineTransform transform, Color[] colors, float[] offsets, BridgeContext ctx)
Builds a concrete gradient according to the specified parameters.
|
protected static MultipleGradientPaint.CycleMethodEnum | convertSpreadMethod(Element paintElement, String s, BridgeContext ctx)
Converts the spreadMethod attribute.
|
Paint | createPaint(BridgeContext ctx, Element paintElement, Element paintedElement, GraphicsNode paintedNode, float opacity)
Creates a Paint according to the specified parameters.
|
protected static List | extractLocalStop(Element gradientElement, float opacity, BridgeContext ctx)
Returns a list of Stop elements, children of the
specified paintElement can have or null if any.
|
protected static List | extractStop(Element paintElement, float opacity, BridgeContext ctx)
Returns the stops elements of the specified gradient
element. |
Parameters: paintElement the element that defines a Paint paintedElement the element referencing the paint paintedNode the graphics node on which the Paint will be applied spreadMethod the spread method colorSpace the color space (sRGB | LinearRGB) transform the gradient transform colors the colors of the gradient offsets the offsets ctx the bridge context to use
Parameters: paintElement the paint Element with a spreadMethod s the spread method ctx the BridgeContext to use for error information
Parameters: ctx the bridge context to use paintElement the 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
Parameters: gradientElement the paint element opacity the opacity ctx the bridge context
Parameters: paintElement the gradient element opacity the opacity ctx the bridge context to use