Rgba Struct Reference

32 bit color struct, with 8 bits per channel More...

List of all members.

Public Member Functions

 Rgba (int r, int g, int b, int a)
 constructor taking 4 integers
 Rgba (Vector4 v)
 constructor taking a Vector4
Vector4 ToVector4 ()
 return the color as a Vector4
bool Equals (Rgba c)
 equality test
override bool Equals (Object o)
 equality test
override string ToString ()
 get the string representation of color value
override int GetHashCode ()
 gets the hash code for this

Static Public Member Functions

static bool operator== (Rgba c1, Rgba c2)
 equality operator
static bool operator!= (Rgba c1, Rgba c2)
 not equals operator

Public Attributes

byte R
 red
byte G
 green
byte B
 blue
byte A
 alpha

Detailed Description

32 bit color struct, with 8 bits per channel


Constructor & Destructor Documentation

Rgba ( int  r,
int  g,
int  b,
int  a 
)

constructor taking 4 integers

Parameters:
rred
ggreen
bblue
aalpha
Rgba ( Vector4  v)

constructor taking a Vector4

Parameters:
vthe vector to init with

Member Function Documentation

bool Equals ( Rgba  c)

equality test

Parameters:
cthe color to compare this to
Returns:
true if this == c, false otherwise
override bool Equals ( Object  o)

equality test

Parameters:
othe object to compare this to
Returns:
true if this == o, false otherwise
override int GetHashCode ( )

gets the hash code for this

Returns:
integer hash code
static bool operator!= ( Rgba  c1,
Rgba  c2 
) [static]

not equals operator

Parameters:
c1color 1
c2color 2
Returns:
true if c 1 != c 2, false otherwise
static bool operator== ( Rgba  c1,
Rgba  c2 
) [static]

equality operator

Parameters:
c1color 1
c2color 2
Returns:
true if color 1 == color 2, false otherwise
override string ToString ( )

get the string representation of color value

Returns:
the string representation of color value
Vector4 ToVector4 ( )

return the color as a Vector4

Returns:
the color as a Vector4

Member Data Documentation

byte A

alpha

byte B

blue

byte G

green

byte R

red