Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.BudgetBoy.Swatch Struct Reference

A group of up to four colors used when drawing things such as Sprites. More...

Public Member Functions

 Swatch (Color24 a, Color24 b, Color24 c)
 Creates a three color swatch with a transparent fourth entry. More...
 
 Swatch (Color24 a, Color24 b, Color24 c, Color24 d)
 Creates a four color swatch. More...
 
 Swatch (Color24 a, Color24 b, Color24 c, Color24 d, SwatchFlags flags)
 
Color24[] GetColors ()
 
float[] GetAlphas ()
 
int Difference (Swatch other)
 Find the square of the euclidean difference between this swatch and another. More...
 
override int GetHashCode ()
 
override bool Equals (object obj)
 
bool Equals (Swatch swatch)
 Tests for equality between this swatch and another. More...
 

Public Attributes

readonly SwatchFlags Flags
 
readonly Color24 A
 First color in the swatch. More...
 
readonly Color24 B
 Second color in the swatch. More...
 
readonly Color24 C
 Third color in the swatch. More...
 
readonly Color24 D
 Fourth color in the swatch. More...
 

Static Public Attributes

static readonly Swatch FullyTransparent
 Represents a completely non-visible swatch. More...
 

Properties

bool TransparencyA [get]
 Is the first color in the swatch transparent? More...
 
bool TransparencyB [get]
 Is the second color in the swatch transparent? More...
 
bool TransparencyC [get]
 Is the third color in the swatch transparent? More...
 
bool TransparencyD [get]
 Is the fourth color in the swatch transparent? More...
 
bool IsFullyTransparent [get]
 Are all four colors in the swatch transparent? More...
 
Color24 this[int index] [get]
 

Detailed Description

A group of up to four colors used when drawing things such as Sprites.

Constructor & Destructor Documentation

GameAPI.BudgetBoy.Swatch.Swatch ( Color24  a,
Color24  b,
Color24  c 
)
inline

Creates a three color swatch with a transparent fourth entry.

Parameters
aThe first color.
bThe second color.
cThe third color.
GameAPI.BudgetBoy.Swatch.Swatch ( Color24  a,
Color24  b,
Color24  c,
Color24  d 
)
inline

Creates a four color swatch.

Parameters
aThe first color.
bThe second color.
cThe third color.
dThe fourth color.
GameAPI.BudgetBoy.Swatch.Swatch ( Color24  a,
Color24  b,
Color24  c,
Color24  d,
SwatchFlags  flags 
)
inline

Member Function Documentation

int GameAPI.BudgetBoy.Swatch.Difference ( Swatch  other)
inline

Find the square of the euclidean difference between this swatch and another.

Parameters
otherThe swatch to compare this swatch to.
override bool GameAPI.BudgetBoy.Swatch.Equals ( object  obj)
inline
bool GameAPI.BudgetBoy.Swatch.Equals ( Swatch  swatch)
inline

Tests for equality between this swatch and another.

Parameters
swatchThe swatch to compare this swatch to.
float [] GameAPI.BudgetBoy.Swatch.GetAlphas ( )
inline
Color24 [] GameAPI.BudgetBoy.Swatch.GetColors ( )
inline
override int GameAPI.BudgetBoy.Swatch.GetHashCode ( )
inline

Member Data Documentation

readonly Color24 GameAPI.BudgetBoy.Swatch.A

First color in the swatch.

readonly Color24 GameAPI.BudgetBoy.Swatch.B

Second color in the swatch.

readonly Color24 GameAPI.BudgetBoy.Swatch.C

Third color in the swatch.

readonly Color24 GameAPI.BudgetBoy.Swatch.D

Fourth color in the swatch.

readonly SwatchFlags GameAPI.BudgetBoy.Swatch.Flags
readonly Swatch GameAPI.BudgetBoy.Swatch.FullyTransparent
static
Initial value:
= new Swatch(
default(Color24), default(Color24), default(Color24), default(Color24), SwatchFlags.FullyTransparent)

Represents a completely non-visible swatch.

Property Documentation

bool GameAPI.BudgetBoy.Swatch.IsFullyTransparent
get

Are all four colors in the swatch transparent?

Color24 GameAPI.BudgetBoy.Swatch.this[int index]
get
bool GameAPI.BudgetBoy.Swatch.TransparencyA
get

Is the first color in the swatch transparent?

bool GameAPI.BudgetBoy.Swatch.TransparencyB
get

Is the second color in the swatch transparent?

bool GameAPI.BudgetBoy.Swatch.TransparencyC
get

Is the third color in the swatch transparent?

bool GameAPI.BudgetBoy.Swatch.TransparencyD
get

Is the fourth color in the swatch transparent?