ARGB (struct)

The argb type represents a 8 bit 4 channel color value, storing the components ordered as alpha, red, green and blue as Byte values.

参考

Color

/*
** Example: Construct ARGB
*/

ARGB color(255, 255, 0, 0);

ARGB ARGB ARGB

Members

Byte a  
Byte r  
Byte g  
Byte b  

Methods

  ARGB ( in ARGB other )
  ARGB ( in Byte a, in Byte r, in Byte g, in Byte b )
  ARGB ( in Integer a, in Integer r, in Integer g, in Integer b )
  ARGB ()
ARGB add ? ( in ARGB other )
ARGB clone ? ()
Boolean equal ? ( in ARGB other )
UInt32 hash ? ()
ARGB linearInterpolate ? ( in ARGB other, in Scalar t )
ARGB multiply ? ( in ARGB other )
ARGB multiplyScalar ? ( in Scalar other )
ARGB subtract ? ( in ARGB other )

Operators

ARGB = ( Param other )

Methods in detail

ARGB ( in ARGB other )

copy constructor


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

Default constructor


ARGB ( in Integer a, in Integer r, in Integer g, in Integer b )

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


ARGB ()

default constructor


ARGB ARGB.add? ( in ARGB other )

Overload method for the add operator.


ARGB ARGB.clone? ()

clone method


Boolean ARGB.equal? ( in ARGB other )

Returns true if both colors are the same


UInt32 ARGB.hash? ()

Hash for this value


ARGB ARGB.linearInterpolate? ( in ARGB other, in Scalar t )

Linearly interpolates this color towards the given color using the provided parameter t

other The ARGB color to interpollate towards.
t the parameter to use for the interpolation. Should range from 0.0 to 1.0, but is not checked.


ARGB ARGB.multiply? ( in ARGB other )

Overload method for the multiply operator.


ARGB ARGB.multiplyScalar? ( in Scalar other )

Overload method for the multiply operator.


ARGB ARGB.subtract? ( in ARGB other )

Overload method for the subtract operator.

Operators in detail

ARGB = ( Param other )

Add-assign operator. Adds another color to this one.