Color with 4 floating point components: red, green, blue and alpha (r, g, b, a). More...
Public Member Functions | |
ColorRGBA (long cPtr, boolean cMemoryOwn) | |
ColorRGBA () | |
Default constructor, initializes the color to (0.0, 0.0, 0.0, 0.0). | |
ColorRGBA (float v) | |
Constructor, initializes the color to (v, v, v, v). More... | |
ColorRGBA (float r, float g, float b) | |
Constructor, initializes the color to (r, g, b, 1.0). More... | |
ColorRGBA (float r, float g, float b, float a) | |
Constructor, initializes the color to (r, g, b, a). More... | |
ColorRGBA | add (float scalar) |
Adds a scalar to each color element. More... | |
ColorRGBA | add (ColorRGBA v) |
Modifies this color by adding another color. More... | |
synchronized void | delete () |
ColorRGBA | divide (float scalar) |
Divides each color element with a scalar. More... | |
boolean | equals (Object obj) |
float | get (long index) |
Returns individual color channel value at index. More... | |
float | getAlpha () |
Returns the alpha element of the color More... | |
float | getBlue () |
Returns the blue element of the color More... | |
float | getGreen () |
Returns the green element of the color More... | |
float | getRed () |
Returns the red element of the color More... | |
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. More... | |
void | set (long index, float v) |
Sets the individual color channel at index to value. More... | |
void | setAlpha (float value) |
Sets the alpha element of the color. More... | |
void | setBlue (float value) |
Sets the blue element of the color. More... | |
void | setGreen (float value) |
Sets the green element of the color. More... | |
void | setRed (float value) |
Sets the red element of the color. More... | |
ColorRGBA | subtract (ColorRGBA v) |
Modifies this color by subtracting another color from this color. More... | |
Static Public Member Functions | |
static ColorRGBA | add (ColorRGBA v1, ColorRGBA v2) |
Adds two colors and returns the sum. More... | |
static ColorRGBA | add (float v1, ColorRGBA v2) |
Adds a color and a scalar and returns the sum. More... | |
static ColorRGBA | add (ColorRGBA v1, float v2) |
Adds a color and a scalar and returns the sum. More... | |
static ColorRGBA | componentAbs (ColorRGBA v) |
Calculates component-wise absolute value for all elements and returns the resulting color. More... | |
static ColorRGBA | componentAdd (ColorRGBA v, float scalar) |
Adds a value to all color elements and returns the resulting color. More... | |
static ColorRGBA | componentCeil (ColorRGBA v) |
Calculates component-wise ceil value for all elements and returns the resulting color. More... | |
static ColorRGBA | componentFloor (ColorRGBA v) |
Calculates component-wise floor value for all elements and returns the resulting color. More... | |
static ColorRGBA | componentRound (ColorRGBA v) |
Calculates component-wise rounded value for all elements and returns the resulting color. More... | |
static ColorRGBA | componentSqrt (ColorRGBA v) |
Calculates component-wise square root all elements and returns the resulting color. More... | |
static ColorRGBA | componentSubtract (ColorRGBA v, float scalar) |
Subtracts a value from all color elements and returns the resulting color. More... | |
static ColorRGBA | componentWiseDivide (ColorRGBA v1, ColorRGBA v2) |
Divides component-wise all color elements and returns the resulting color. More... | |
static ColorRGBA | componentWiseMax (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise maximum for all color elements and returns the resulting color. More... | |
static ColorRGBA | componentWiseMin (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise minimum for all color elements and returns the resulting color. More... | |
static ColorRGBA | componentWiseMultiply (ColorRGBA v1, ColorRGBA v2) |
Multiplies component-wise all color elements and returns the resulting color. More... | |
static ColorRGBA | componentWiseRemainder (ColorRGBA v1, ColorRGBA v2) |
Calculates component-wise the remainder for all color elements and returns the resulting color. More... | |
static ColorRGBA | divide (ColorRGBA v, float scalar) |
Divides all color elements with a scalar and returns the resulting color. More... | |
static float | dotProduct (ColorRGBA v1, ColorRGBA v2) |
Calculates the dot product of two colors. More... | |
static ColorRGBA | fromSRGB (float r, float g, float b, float a) |
Returns a linear color with each element set from a sRGB value. More... | |
static ColorRGBA | fromSRGB (float r, float g, float b) |
Returns a linear color with each element set from a sRGB value. More... | |
static long | getCPtr (ColorRGBA obj) |
static ColorRGBA | getThemeBlue () |
Returns the default blue theme color. More... | |
static ColorRGBA | getThemeGray () |
Returns the default gray theme color. More... | |
static ColorRGBA | getThemeGreen () |
Returns the default green theme color. More... | |
static ColorRGBA | getThemeOrange () |
Returns the default orange theme color. More... | |
static ColorRGBA | getThemeRed () |
Returns the default red theme color. More... | |
static ColorRGBA | getThemeYellow () |
Returns the default yellow theme color. More... | |
static ColorRGBA | highestValue () |
Returns the color with each element having the most positive float value. More... | |
static ColorRGBA | linearTosRGB (ColorRGBA cs) |
Converts whole ColorRGBA color from linear to sRGB. More... | |
static ColorRGBA | lowestValue () |
Returns the color with each element having the most negative float value. More... | |
static ColorRGBA | multiply (float scalar, ColorRGBA v) |
Multiplies all color elements with a scalar and returns the resulting color. More... | |
static ColorRGBA | multiply (ColorRGBA v, float scalar) |
Multiplies all color elements with a scalar and returns the resulting color. More... | |
static ColorRGBA | nan () |
Returns the color with each element being NaN. More... | |
static ColorRGBA | negativeInfinity () |
Returns the color with each element being the negative infinity. More... | |
static ColorRGBA | one () |
Returns the color with each element being one. More... | |
static ColorRGBA | opaqueBlack () |
Returns opaque black color (0.0, 0.0, 0.0, 1.0). More... | |
static ColorRGBA | positiveInfinity () |
Returns the color with each element being the positive infinity. More... | |
static ColorRGBA | sRGBToLinear (ColorRGBA cs) |
Converts to whole ColorRGBA from sRGB to linear. More... | |
static ColorRGBA | subtract (ColorRGBA v1, ColorRGBA v2) |
Subtracts two colors and returns the difference. More... | |
static ColorRGBA | transparentBlack () |
Returns transparent black color (0.0, 0.0, 0.0, 0.0). More... | |
static ColorRGBA | zero () |
Returns the color with each element being zero. More... | |
Protected Member Functions | |
void | finalize () |
Protected Attributes | |
transient boolean | swigCMemOwn |
Color with 4 floating point components: red, green, blue and alpha (r, g, b, a).
ColorRGBA | ( | float | v | ) |
Constructor, initializes the color to (v, v, v, v).
v | Red, Green, Blue, and Alpha component of the color. |
ColorRGBA | ( | float | r, |
float | g, | ||
float | b | ||
) |
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. |
ColorRGBA | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
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. |
ColorRGBA add | ( | float | scalar | ) |
Adds a scalar to each color element.
scalar | Another 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 scalar. |
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. |
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. |
ColorRGBA divide | ( | float | scalar | ) |
Divides each color element with a scalar.
scalar | Divider for each color element. |
Divides all color elements with a scalar and returns the resulting color.
v | A color. |
scalar | A scalar. |
Calculates the dot product of two colors.
v1 | The first color. |
v2 | The second color. |
|
static |
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) |
|
static |
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) |
float get | ( | long | 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
|
static |
Returns the default blue theme color.
|
static |
Returns the default gray theme color.
|
static |
Returns the default green theme color.
|
static |
Returns the default orange theme color.
|
static |
Returns the default red theme color.
|
static |
Returns the default yellow theme color.
|
static |
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. |
|
static |
Returns the color with each element having the most negative float value.
ColorRGBA multiply | ( | float | 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. |
Multiplies all color elements with a scalar and returns the resulting color.
v | A color. |
scalar | A scalar. |
|
static |
Returns the color with each element being NaN.
|
static |
Returns the color with each element being the negative infinity.
|
static |
Returns the color with each element being one.
|
static |
Returns opaque black color (0.0, 0.0, 0.0, 1.0).
|
static |
Returns the color with each element being the positive infinity.
void set | ( | long | index, |
float | v | ||
) |
Sets the individual color channel at index to value.
index | Color channel index to set. |
void setAlpha | ( | float | value | ) |
Sets the alpha element of the color.
value | The new value of the alpha element. |
void setBlue | ( | float | value | ) |
Sets the blue element of the color.
value | The new value of the blue element. |
void setGreen | ( | float | value | ) |
Sets the green element of the color.
value | The new value of the green element. |
void setRed | ( | float | value | ) |
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. |
|
static |
Returns transparent black color (0.0, 0.0, 0.0, 0.0).
|
static |
Returns the color with each element being zero.