Class FloatColor


  • public final class FloatColor
    extends java.lang.Object
    Each of alpha, red, green, and blue shall be in the range [0.0,1.0].
    • Constructor Summary

      Constructors 
      Constructor Description
      FloatColor()
      Creates a completely opaque, completely black color.
      FloatColor​(double red, double green, double blue)
      Creates a fully opaque color with specified RGB components, which are each in the range [0.0,1.0].
      FloatColor​(double alpha, double red, double green, double blue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double alpha()
      Fully opaque colors have an alpha of 1.0.
      double blue()  
      double green()  
      void reassign​(double red, double green, double blue)
      Makes this color fully opaque and reassigns RGB values.
      void reassign​(double alpha, double red, double green, double blue)
      Reassigns this color's ARGB values.
      double red()  
      • Methods inherited from class java.lang.Object

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

      • FloatColor

        public FloatColor​(double alpha,
                          double red,
                          double green,
                          double blue)
        Throws:
        java.lang.IllegalArgumentException - if any one of alpha, red, green, and blue is not in the range [0.0,1.0].
      • FloatColor

        public FloatColor​(double red,
                          double green,
                          double blue)
        Creates a fully opaque color with specified RGB components, which are each in the range [0.0,1.0].
      • FloatColor

        public FloatColor()
        Creates a completely opaque, completely black color.
    • Method Detail

      • alpha

        public double alpha()
        Fully opaque colors have an alpha of 1.0.
      • red

        public double red()
      • green

        public double green()
      • blue

        public double blue()
      • reassign

        public void reassign​(double alpha,
                             double red,
                             double green,
                             double blue)
        Reassigns this color's ARGB values.
      • reassign

        public void reassign​(double red,
                             double green,
                             double blue)
        Makes this color fully opaque and reassigns RGB values.