Class AnimationFunctions.ColorFunction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private AnimationFunction<java.lang.Integer> alphaFunction
      Refers to an AnimationFunction of float values that maps a time to the alpha value of an sRGB color value.
      private AnimationFunction<java.lang.Integer> blueFunction
      Refers to an AnimationFunction of float values that maps a time to the blue component of an sRGB color value.
      private AnimationFunction<java.lang.Integer> greenFunction
      Refers to an AnimationFunction of float values that maps a time to the green component of an sRGB color value.
      private AnimationFunction<java.lang.Integer> redFunction
      Refers to an AnimationFunction of float values that maps a time to the red component of an sRGB color value.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ColorFunction​(long duration, java.awt.Color[] colors, float[] keyTimes)
      Creates an AnimationFunction that maps times to instances of Color.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color valueAt​(long time)
      Returns the interpolated color for a given time in the valid time interval.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • redFunction

        private final AnimationFunction<java.lang.Integer> redFunction
        Refers to an AnimationFunction of float values that maps a time to the red component of an sRGB color value.
      • greenFunction

        private final AnimationFunction<java.lang.Integer> greenFunction
        Refers to an AnimationFunction of float values that maps a time to the green component of an sRGB color value.
      • blueFunction

        private final AnimationFunction<java.lang.Integer> blueFunction
        Refers to an AnimationFunction of float values that maps a time to the blue component of an sRGB color value.
      • alphaFunction

        private final AnimationFunction<java.lang.Integer> alphaFunction
        Refers to an AnimationFunction of float values that maps a time to the alpha value of an sRGB color value.
    • Constructor Detail

      • ColorFunction

        private ColorFunction​(long duration,
                              java.awt.Color[] colors,
                              float[] keyTimes)
        Creates an AnimationFunction that maps times to instances of Color. The mapping is interpolated from an array of Colors using an array of key times.
        Parameters:
        duration - the duration of this animation function
        colors - the colors to interpolate.
        keyTimes - an array of key times used to distribute the result values over the time.
    • Method Detail

      • valueAt

        public java.awt.Color valueAt​(long time)
        Returns the interpolated color for a given time in the valid time interval.
        Parameters:
        time - the time used to determine the interpolated color
        Returns:
        the interpolated color for the given time