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.

参考

Color, ARGB

/*
** Example: RGBA
*/

RGBA red(255, 0, 0, 255);

RGBA RGBA RGBA

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 )

Operators

RGBA = ( Param other )

Methods in detail

RGBA ( in Byte r, in Byte g, in Byte b, in Byte a )

Default constructor from component wise bytes


RGBA ( in Color c )

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


RGBA ( in RGB r )

Constructor from RGB


RGBA ( in RGBA other )

copy constructor


RGBA ()

default constructor


RGBA RGBA.add? ( in RGBA other )

Overload method for the add operator


RGBA RGBA.clone? ()

clone method


Boolean RGBA.equal? ( in RGBA other )

Returns true if this RGBA is the same as another one


UInt32 RGBA.hash? ()

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

Operators in detail

RGBA = ( Param other )

Adds another RGBA color to this one