org.apache.batik.anim.values

Class AnimatablePaintValue

public class AnimatablePaintValue extends AnimatableColorValue

An SVG paint value in the animation system.
Field Summary
protected intpaintType
The type of paint.
static intPAINT_COLOR
static intPAINT_CURRENT_COLOR
static intPAINT_INHERIT
static intPAINT_NONE
static intPAINT_URI
static intPAINT_URI_COLOR
static intPAINT_URI_CURRENT_COLOR
static intPAINT_URI_NONE
protected Stringuri
The URI of the referenced paint server.
Constructor Summary
protected AnimatablePaintValue(AnimationTarget target)
Creates a new, uninitialized AnimatablePaintValue.
protected AnimatablePaintValue(AnimationTarget target, float r, float g, float b)
Creates a new AnimatablePaintValue.
Method Summary
booleancanPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.
static AnimatablePaintValuecreateColorPaintValue(AnimationTarget target, float r, float g, float b)
Creates a new AnimatablePaintValue for a color value.
static AnimatablePaintValuecreateCurrentColorPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'currentColor' value.
static AnimatablePaintValuecreateInheritPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'inherit' value.
static AnimatablePaintValuecreateNonePaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'none' value.
static AnimatablePaintValuecreateURIColorPaintValue(AnimationTarget target, String uri, float r, float g, float b)
Creates a new AnimatablePaintValue for a URI reference with a color fallback.
static AnimatablePaintValuecreateURICurrentColorPaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.
static AnimatablePaintValuecreateURINonePaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback.
static AnimatablePaintValuecreateURIPaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference.
floatdistanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.
StringgetCssText()
Returns the CSS text representation of the value.
intgetPaintType()
Returns the type of paint this value represents.
StringgetURI()
Returns the paint server URI.
AnimatableValuegetZeroValue()
Returns a zero value of this AnimatableValue's type.
AnimatableValueinterpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value.

Field Detail

paintType

protected int paintType
The type of paint.

PAINT_COLOR

public static final int PAINT_COLOR

PAINT_CURRENT_COLOR

public static final int PAINT_CURRENT_COLOR

PAINT_INHERIT

public static final int PAINT_INHERIT

PAINT_NONE

public static final int PAINT_NONE

PAINT_URI

public static final int PAINT_URI

PAINT_URI_COLOR

public static final int PAINT_URI_COLOR

PAINT_URI_CURRENT_COLOR

public static final int PAINT_URI_CURRENT_COLOR

PAINT_URI_NONE

public static final int PAINT_URI_NONE

uri

protected String uri
The URI of the referenced paint server.

Constructor Detail

AnimatablePaintValue

protected AnimatablePaintValue(AnimationTarget target)
Creates a new, uninitialized AnimatablePaintValue.

AnimatablePaintValue

protected AnimatablePaintValue(AnimationTarget target, float r, float g, float b)
Creates a new AnimatablePaintValue.

Method Detail

canPace

public boolean canPace()
Returns whether two values of this type can have their distance computed, as needed by paced animation.

createColorPaintValue

public static AnimatablePaintValue createColorPaintValue(AnimationTarget target, float r, float g, float b)
Creates a new AnimatablePaintValue for a color value.

createCurrentColorPaintValue

public static AnimatablePaintValue createCurrentColorPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'currentColor' value.

createInheritPaintValue

public static AnimatablePaintValue createInheritPaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'inherit' value.

createNonePaintValue

public static AnimatablePaintValue createNonePaintValue(AnimationTarget target)
Creates a new AnimatablePaintValue for a 'none' value.

createURIColorPaintValue

public static AnimatablePaintValue createURIColorPaintValue(AnimationTarget target, String uri, float r, float g, float b)
Creates a new AnimatablePaintValue for a URI reference with a color fallback.

createURICurrentColorPaintValue

public static AnimatablePaintValue createURICurrentColorPaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.

createURINonePaintValue

public static AnimatablePaintValue createURINonePaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback.

createURIPaintValue

public static AnimatablePaintValue createURIPaintValue(AnimationTarget target, String uri)
Creates a new AnimatablePaintValue for a URI reference.

distanceTo

public float distanceTo(AnimatableValue other)
Returns the absolute distance between this value and the specified other value.

getCssText

public String getCssText()
Returns the CSS text representation of the value.

getPaintType

public int getPaintType()
Returns the type of paint this value represents.

getURI

public String getURI()
Returns the paint server URI.

getZeroValue

public AnimatableValue getZeroValue()
Returns a zero value of this AnimatableValue's type.

interpolate

public AnimatableValue interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)
Performs interpolation to the given value.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.