Color with 4 floating point components: red, green, blue and alpha (r, g, b, a). More...
Public Member Functions | |
ColorRGBA () | |
Default constructor, initializes the color to (0.0, 0.0, 0.0, 0.0). | |
ColorRGBA (float r, float g, float b) | |
Constructor, initializes the color to (r, g, b, 1.0). | |
ColorRGBA (float r, float g, float b, float a) | |
Constructor, initializes the color to (r, g, b, a). | |
ColorRGBA (float v) | |
Constructor, initializes the color to (v, v, v, v). | |
ColorRGBA | add (ColorRGBA v) |
Modifies this color by adding another color. | |
ColorRGBA | add (float scalar) |
Adds a scalar to each color element. | |
synchronized void | delete () |
ColorRGBA | divide (float scalar) |
Divides each color element with a scalar. | |
boolean | equals (Object obj) |
Indicates whether some other object is "equal to" this one. | |
float | get (int index) |
Returns individual color channel value at index. | |
float | getAlpha () |
Returns the alpha element of the color | |
float | getBlue () |
Returns the blue element of the color | |
float | getGreen () |
Returns the green element of the color | |
float | getRed () |
Returns the red element of the color | |
int | hashCode () |
Returns a hash code value for the object. | |
boolean | hasNan () |
Returns true if and only if at least one of the vector values is NaN. | |
ColorRGBA | multiply (float scalar) |
Multiplies each color element with a scalar. | |
void | set (int index, float v) |
Sets the individual color channel at index to value. | |
void | setAlpha (float value) |
Sets the alpha element of the color. | |
void | setBlue (float value) |
Sets the blue element of the color. | |
void | setGreen (float value) |
Sets the green element of the color. | |
void | setRed (float value) |
Sets the red element of the color. | |
ColorRGBA | subtract (ColorRGBA v) |
Modifies this color by subtracting another color from this color. | |
Static Public Member Functions | |
static ColorRGBA | add (ColorRGBA v1, ColorRGBA v2) |
Adds two colors and returns the sum. | |
static ColorRGBA | add (ColorRGBA v1, float v2) |
Adds a color and a scalar and returns the sum. | |
static ColorRGBA | add (float v1, ColorRGBA v2) |
Adds a color and a scalar and returns the sum. | |
static ColorRGBA | componentAbs (ColorRGBA v) |
Calculates component-wise absolute value for all elements and returns the resulting color. | |
static ColorRGBA | componentAdd (ColorRGBA v, float scalar) |
Adds a value to all color elements and returns the resulting color. | |
static ColorRGBA | componentCeil (ColorRGBA v) |
Calculates component-wise ceil value for all elements and returns the resulting color. | |
static ColorRGBA | componentFloor (ColorRGBA v) |
Calculates component-wise floor value for all elements and returns the resulting color. | |
static ColorRGBA | componentRound (ColorRGBA v) |
Calculates component-wise rounded value for all elements and returns the resulting color. | |
static ColorRGBA | componentSqrt (ColorRGBA v) |
Calculates component-wise square root all elements and returns the resulting color. | |
static ColorRGBA | componentSubtract (ColorRGBA v, float scalar) |
Subtracts a value from all color elements and returns the resulting color. | |
static ColorRGBA | componentWiseDivide (ColorRGBA v1, ColorRGBA v2) |
Divides component-wise all color elements and returns the resulting color. | |
static ColorRGBA | componentWiseMax (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise maximum for all color elements and returns the resulting color. | |
static ColorRGBA | componentWiseMin (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise minimum for all color elements and returns the resulting color. | |
static ColorRGBA | componentWiseMultiply (ColorRGBA v1, ColorRGBA v2) |
Multiplies component-wise all color elements and returns the resulting color. | |
static ColorRGBA | componentWiseRemainder (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise the remainder for all color elements and returns the resulting color. | |
static ColorRGBA | divide (ColorRGBA v, float scalar) |
Divides all color elements with a scalar and returns the resulting color. | |
static float | dotProduct (ColorRGBA v1, ColorRGBA v2) |
Calculates the dot product of two colors. | |
static ColorRGBA | fromSRGB (float r, float g, float b) |
Returns a linear color with each element set from a sRGB value. | |
static ColorRGBA | fromSRGB (float r, float g, float b, float a) |
Returns a linear color with each element set from a sRGB value. | |
static ColorRGBA | getThemeBlue () |
Returns the default blue theme color. | |
static ColorRGBA | getThemeGray () |
Returns the default gray theme color. | |
static ColorRGBA | getThemeGreen () |
Returns the default green theme color. | |
static ColorRGBA | getThemeOrange () |
Returns the default orange theme color. | |
static ColorRGBA | getThemeRed () |
Returns the default red theme color. | |
static ColorRGBA | getThemeYellow () |
Returns the default yellow theme color. | |
static ColorRGBA | highestValue () |
Returns the color with each element having the most positive float value. | |
static ColorRGBA | linearTosRGB (ColorRGBA cs) |
Converts whole ColorRGBA color from linear to sRGB. | |
static ColorRGBA | lowestValue () |
Returns the color with each element having the most negative float value. | |
static ColorRGBA | multiply (ColorRGBA v, float scalar) |
Multiplies all color elements with a scalar and returns the resulting color. | |
static ColorRGBA | multiply (float scalar, ColorRGBA v) |
Multiplies all color elements with a scalar and returns the resulting color. | |
static ColorRGBA | nan () |
Returns the color with each element being NaN. | |
static ColorRGBA | negativeInfinity () |
Returns the color with each element being the negative infinity. | |
static ColorRGBA | one () |
Returns the color with each element being one. | |
static ColorRGBA | opaqueBlack () |
Returns opaque black color (0.0, 0.0, 0.0, 1.0). | |
static ColorRGBA | positiveInfinity () |
Returns the color with each element being the positive infinity. | |
static ColorRGBA | sRGBToLinear (ColorRGBA cs) |
Converts to whole ColorRGBA from sRGB to linear. | |
static ColorRGBA | subtract (ColorRGBA v1, ColorRGBA v2) |
Subtracts two colors and returns the difference. | |
static ColorRGBA | transparentBlack () |
Returns transparent black color (0.0, 0.0, 0.0, 0.0). | |
static ColorRGBA | zero () |
Returns the color with each element being zero. | |
Protected Member Functions | |
void | finalize () |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | |
Protected Attributes | |
transient boolean | swigCMemOwn |
Does this object own its native object. | |
Color with 4 floating point components: red, green, blue and alpha (r, g, b, a).
Constructor, initializes the color to (v, v, v, v).
v | Red, Green, Blue, and Alpha component of the color. |
Constructor, initializes the color to (r, g, b, 1.0).
r | Red component of the color. |
g | Green component of the color. |
b | Blue component of the color. |
Constructor, initializes the color to (r, g, b, a).
r | Red component of the color. |
g | Green component of the color. |
b | Blue component of the color. |
a | Alpha component of the color. |
Modifies this color by adding another color.
v | Another color. |
Adds two colors and returns the sum.
v1 | Left hand side color. |
v2 | Right hand side color. |
Adds a color and a scalar and returns the sum.
v1 | Left hand side color. |
v2 | Right hand side scalar. |
Adds a scalar to each color element.
scalar | Another color. |
Adds a color and a scalar and returns the sum.
v1 | Left hand side scalar. |
v2 | Right hand side color. |
Calculates component-wise absolute value for all elements and returns the resulting color.
v | Color input. |
Adds a value to all color elements and returns the resulting color.
v | Color. |
scalar | Value |
Calculates component-wise ceil value for all elements and returns the resulting color.
v | Color input. |
Calculates component-wise floor value for all elements and returns the resulting color.
v | Color input. |
Calculates component-wise rounded value for all elements and returns the resulting color.
v | Color input. |
Calculates component-wise square root all elements and returns the resulting color.
v | Color input. |
Subtracts a value from all color elements and returns the resulting color.
v | Color. |
scalar | Value |
Divides component-wise all color elements and returns the resulting color.
v1 | The first color. |
v2 | The second color. |
Calculates component-wise maximum for all color elements and returns the resulting color.
v1 | The first color. |
v2 | The second color. |
Calculates component-wise minimum for all color elements and returns the resulting color.
v1 | The first color. |
v2 | The second color. |
Multiplies component-wise all color elements and returns the resulting color.
v1 | The first color. |
v2 | The second color. |
Calculates component-wise the remainder for all color elements and returns the resulting color.
v1 | The first color. |
v2 | The second color. |
Divides all color elements with a scalar and returns the resulting color.
v | A color. |
scalar | A scalar. |
Divides each color element with a scalar.
scalar | Divider for each color element. |
Calculates the dot product of two colors.
v1 | The first color. |
v2 | The second color. |
boolean equals | ( | Object | obj | ) |
Indicates whether some other object is "equal to" this one.
obj | The reference object with which to compare. |
|
protected |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
Finalization is deprecated and subject to removal in future.
Returns a linear color with each element set from a sRGB value.
r | Red Channel (0-1.0) |
g | Green Channel (0-1.0) |
b | Blue Channel (0-1.0) |
Returns a linear color with each element set from a sRGB value.
r | Red Channel (0-1.0) |
g | Green Channel (0-1.0) |
b | Blue Channel (0-1.0) |
a | Alpha Channel (0-1.0) |
Returns individual color channel value at index.
float getAlpha | ( | ) |
Returns the alpha element of the color
float getBlue | ( | ) |
Returns the blue element of the color
float getGreen | ( | ) |
Returns the green element of the color
float getRed | ( | ) |
Returns the red element of the color
Returns the default blue theme color.
Returns the default gray theme color.
Returns the default green theme color.
Returns the default orange theme color.
Returns the default red theme color.
Returns the default yellow theme color.
int hashCode | ( | ) |
Returns a hash code value for the object.
Returns the color with each element having the most positive float value.
Converts whole ColorRGBA color from linear to sRGB.
cs | Color in linear format. |
Returns the color with each element having the most negative float value.
Multiplies all color elements with a scalar and returns the resulting color.
v | A color. |
scalar | A scalar. |
Multiplies each color element with a scalar.
scalar | Multiplier for each color element. |
Multiplies all color elements with a scalar and returns the resulting color.
scalar | A scalar. |
v | A color. |
Returns the color with each element being NaN.
Returns the color with each element being the negative infinity.
Returns the color with each element being one.
Returns opaque black color (0.0, 0.0, 0.0, 1.0).
Returns the color with each element being the positive infinity.
Sets the individual color channel at index to value.
index | Color channel index to set. |
Sets the alpha element of the color.
value | The new value of the alpha element. |
Sets the blue element of the color.
value | The new value of the blue element. |
Sets the green element of the color.
value | The new value of the green element. |
Sets the red element of the color.
value | The new value of the red element. |
Converts to whole ColorRGBA from sRGB to linear.
cs | Color in sRGB format. |
Modifies this color by subtracting another color from this color.
v | Another color. |
Subtracts two colors and returns the difference.
v1 | Left hand side color. |
v2 | Right hand side color. |
Returns transparent black color (0.0, 0.0, 0.0, 0.0).