Package com.nerius.grafx
Class FloatColor
- java.lang.Object
-
- com.nerius.grafx.FloatColor
-
public final class FloatColor extends java.lang.Object
Each ofalpha
,red
,green
, andblue
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 analpha
of1.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()
-
-
-
Constructor Detail
-
FloatColor
public FloatColor(double alpha, double red, double green, double blue)
- Throws:
java.lang.IllegalArgumentException
- if any one ofalpha
,red
,green
, andblue
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 analpha
of1.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.
-
-