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

      • 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.
      • 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
      • getCssText

        public java.lang.String getCssText()
        Returns the CSS text representation of the value.
        Overrides:
        getCssText in class AnimatableColorValue