Class AnimatablePaintValue


public class AnimatablePaintValue extends AnimatableColorValue
An SVG paint value in the animation system.
Version:
$Id: AnimatablePaintValue.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

  • Constructor Details

    • 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 Details

    • 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, String uri)
      Creates a new AnimatablePaintValue for a URI reference.
    • createURINonePaintValue

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

      public static AnimatablePaintValue createURICurrentColorPaintValue(AnimationTarget target, String uri)
      Creates a new AnimatablePaintValue for a URI reference with a 'currentColor' fallback.
    • 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.
    • 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 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 String getCssText()
      Returns the CSS text representation of the value.
      Overrides:
      getCssText in class AnimatableColorValue