## org.apache.batik.anim.values
Class AnimatablePaintValue

    java.lang.Object
      org.apache.batik.anim.values.AnimatableValue
          org.apache.batik.anim.values.AnimatableColorValue
              org.apache.batik.anim.values.AnimatablePaintValue

    public class AnimatablePaintValue

extends AnimatableColorValue

An SVG paint value in the animation system.

Field Summary
`static int` `PAINT_COLOR`
`static int` `PAINT_CURRENT_COLOR`
`static int` `PAINT_INHERIT`
`static int` `PAINT_NONE`
`static int` `PAINT_URI`
`static int` `PAINT_URI_COLOR`
`static int` `PAINT_URI_CURRENT_COLOR`
`static int` `PAINT_URI_NONE`
`protected int` `paintType` The type of paint.
`protected java.lang.String` `uri` The URI of the referenced paint server.

Fields inherited from class org.apache.batik.anim.values.AnimatableColorValue
`blue, green, red`

Fields inherited from class org.apache.batik.anim.values.AnimatableValue
`decimalFormat, hasChanged, target`

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
`boolean` `canPace()` Returns whether two values of this type can have their distance computed, as needed by paced animation.
`static AnimatablePaintValue` `createColorPaintValue(AnimationTarget target, float r, float g, float b)` Creates a new AnimatablePaintValue for a color value.
`static AnimatablePaintValue` `createCurrentColorPaintValue(AnimationTarget target)` Creates a new AnimatablePaintValue for a 'currentColor' value.
`static AnimatablePaintValue` `createInheritPaintValue(AnimationTarget target)` Creates a new AnimatablePaintValue for a 'inherit' value.
`static AnimatablePaintValue` `createNonePaintValue(AnimationTarget target)` Creates a new AnimatablePaintValue for a 'none' value.
`static AnimatablePaintValue` `createURIColorPaintValue(AnimationTarget target, java.lang.String uri, float r, float g, float b)` Creates a new AnimatablePaintValue for a URI reference with a color fallback.
`static AnimatablePaintValue` `createURICurrentColorPaintValue(AnimationTarget target, java.lang.String uri)` Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.
`static AnimatablePaintValue` `createURINonePaintValue(AnimationTarget target, java.lang.String uri)` Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback.
`static AnimatablePaintValue` `createURIPaintValue(AnimationTarget target, java.lang.String uri)` Creates a new AnimatablePaintValue for a URI reference.
`float` `distanceTo(AnimatableValue other)` Returns the absolute distance between this value and the specified other value.
`java.lang.String` `getCssText()` Returns the CSS text representation of the value.
`int` `getPaintType()` Returns the type of paint this value represents.
`java.lang.String` `getURI()` Returns the paint server URI.
`AnimatableValue` `getZeroValue()` Returns a zero value of this AnimatableValue's type.
`AnimatableValue` `interpolate(AnimatableValue result, AnimatableValue to, float interpolation, AnimatableValue accumulation, int multiplier)` Performs interpolation to the given value.

Methods inherited from class org.apache.batik.anim.values.AnimatableValue
`formatNumber, hasChanged, toString, toStringRep`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PAINT_NONE

    public static final int PAINT_NONE

See Also:
  Constant Field Values

### PAINT_CURRENT_COLOR

    public static final int PAINT_CURRENT_COLOR

See Also:
  Constant Field Values

### PAINT_COLOR

    public static final int PAINT_COLOR

See Also:
  Constant Field Values

### PAINT_URI

    public static final int PAINT_URI

See Also:
  Constant Field Values

### PAINT_URI_NONE

    public static final int PAINT_URI_NONE

See Also:
  Constant Field Values

### PAINT_URI_CURRENT_COLOR

    public static final int PAINT_URI_CURRENT_COLOR

See Also:
  Constant Field Values

### PAINT_URI_COLOR

    public static final int PAINT_URI_COLOR

See Also:
  Constant Field Values

### PAINT_INHERIT

    public static final int PAINT_INHERIT

See Also:
  Constant Field Values

### paintType

    protected int paintType

  The type of paint.

### uri

    protected java.lang.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

### createNonePaintValue

    public static AnimatablePaintValue createNonePaintValue(AnimationTarget target)

  Creates a new AnimatablePaintValue for a 'none' value.

### createCurrentColorPaintValue

    public static AnimatablePaintValue createCurrentColorPaintValue(AnimationTarget target)

  Creates a new AnimatablePaintValue for a 'currentColor' value.

### createColorPaintValue

    public static AnimatablePaintValue createColorPaintValue(AnimationTarget target,
                                                             float r,
                                                             float g,
                                                             float b)

  Creates a new AnimatablePaintValue for a color value.

### createURIPaintValue

    public static AnimatablePaintValue createURIPaintValue(AnimationTarget target,
                                                           java.lang.String uri)

  Creates a new AnimatablePaintValue for a URI reference.

### createURINonePaintValue

    public static AnimatablePaintValue createURINonePaintValue(AnimationTarget target,
                                                               java.lang.String uri)

  Creates a new AnimatablePaintValue for a URI reference with a 'none' fallback.

### createURICurrentColorPaintValue

    public static AnimatablePaintValue createURICurrentColorPaintValue(AnimationTarget target,
                                                                       java.lang.String uri)

  Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.

### createURIColorPaintValue

    public static AnimatablePaintValue createURIColorPaintValue(AnimationTarget target,
                                                                java.lang.String uri,
                                                                float r,
                                                                float g,
                                                                float b)

  Creates a new AnimatablePaintValue for a URI reference with a color fallback.

### createInheritPaintValue

    public static AnimatablePaintValue createInheritPaintValue(AnimationTarget target)

  Creates a new AnimatablePaintValue for a 'inherit' value.

### interpolate

    public AnimatableValue interpolate(AnimatableValue result,
                                       AnimatableValue to,
                                       float interpolation,
                                       AnimatableValue accumulation,
                                       int multiplier)

  Performs interpolation to the given value.

  Overrides:
    `interpolate` in class `AnimatableColorValue`
  Parameters:
    `result` - the object in which to store the result of the interpolation, or null if a new object should be created
    `to` - the value this value should be interpolated towards, or null if no actual interpolation should be performed
    `interpolation` - the interpolation distance, 0 <= interpolation <= 1
    `accumulation` - an accumulation to add to the interpolated value
    `multiplier` - an amount the accumulation values should be multiplied by before being added to the interpolated value

### getPaintType

    public int getPaintType()

  Returns the type of paint this value represents.

### getURI

    public java.lang.String getURI()

  Returns the paint server URI.

### canPace

    public boolean canPace()

  Returns whether two values of this type can have their distance computed, as needed by paced animation.

  Overrides:
    `canPace` in class `AnimatableColorValue`

### distanceTo

    public float distanceTo(AnimatableValue other)

  Returns the absolute distance between this value and the specified other value.

  Overrides:
    `distanceTo` in class `AnimatableColorValue`

### getZeroValue

    public AnimatableValue getZeroValue()

  Returns a zero value of this AnimatableValue's type.

  Overrides:
    `getZeroValue` in class `AnimatableColorValue`

### getCssText

    public java.lang.String getCssText()

  Returns the CSS text representation of the value.

  Overrides:
    `getCssText` in class `AnimatableColorValue`

Copyright © 2008 Apache Software Foundation. All Rights Reserved.