RGBA (struct)¶
The RGBA type represents a 8 bit 4 channel color value, storing the components ordered as red, green, blue and alpha as Byte values.
/*
** Example: RGBA
*/
RGBA red(255, 0, 0, 255);
Members¶
Byte | r | |
Byte | g | |
Byte | b | |
Byte | a |
Methods¶
RGBA ( in Byte r, in Byte g, in Byte b, in Byte a ) | |
RGBA ( in Color c ) | |
RGBA ( in Integer r, in Integer g, in Integer b, in Integer a ) | |
RGBA ( in RGB r ) | |
RGBA ( in RGBA other ) | |
RGBA () | |
RGBA | add ? ( in RGBA other ) |
RGBA | clone ? () |
Boolean | equal ? ( in RGBA other ) |
UInt32 | hash ? () |
RGBA | linearInterpolate ? ( in RGBA other, in Scalar t ) |
RGBA | multiply ? ( in RGBA other ) |
RGBA | multiplyScalar ? ( in Scalar other ) |
RGBA | subtract ? ( in RGBA other ) |
Methods in detail¶
RGBA ( in Byte r, in Byte g, in Byte b, in Byte a )
Default constructor from component wise bytes
Constructor from Color
RGBA ( in Integer r, in Integer g, in Integer b, in Integer a )
Constructor from component wise integers.
注釈
Automatic casting would mean that the default constructor above would be called, but would also generate warnings due to the loss of precision
Constructor from RGB
copy constructor
RGBA ()
default constructor
RGBA RGBA.add? ( in RGBA other )
Overload method for the add operator
clone method
Boolean RGBA.equal? ( in RGBA other )
Returns true if this RGBA is the same as another one
Hash for this value
RGBA RGBA.linearInterpolate? ( in RGBA other, in Scalar t )
interpolates two RGBA colors given a scalar blend value (0.0 to 1.0)
RGBA RGBA.multiply? ( in RGBA other )
Overload method for the multiply operator
RGBA RGBA.multiplyScalar? ( in Scalar other )
Returns the product of this RGBA color and a scalar
RGBA RGBA.subtract? ( in RGBA other )
Overload method for the subtract operator