Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.BudgetBoy.PaletteBuilder Class Reference

Class used to construct a custom Palette. A Palette contains up to 256 Swatch entries, each of which contains 4 colors to be used when drawing an Image. More...

Public Member Functions

SwatchIndex AddNESPalette ()
 Adds 64 swatches that approximate the NES palette, returning the index of the first color. More...
 
SwatchIndex Add (Swatch swatch)
 Adds the given color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add3 (Color24 rgb)
 Adds a swatch containing the given color for the first three components, with transparency for the fourth. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add3 (byte r, byte g, byte b)
 Adds a swatch containing the given color for the first three components, with transparency for the fourth. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add4 (Color24 clr)
 Adds a swatch containing the given color for all four components. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add4 (byte r, byte g, byte b)
 Adds a swatch containing the given color for all four components. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add (Color24 a, Color24 b, Color24 c)
 Adds the given three color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 
SwatchIndex Add (Color24 a, Color24 b, Color24 c, Color24 d)
 Adds the given four color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry. More...
 

Properties

Swatch this[SwatchIndex index] [get, set]
 Gets or sets the Swatch corresponding to the given SwatchIndex. More...
 

Detailed Description

Class used to construct a custom Palette. A Palette contains up to 256 Swatch entries, each of which contains 4 colors to be used when drawing an Image.

Member Function Documentation

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add ( Swatch  swatch)
inline

Adds the given color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add ( Color24  a,
Color24  b,
Color24  c 
)
inline

Adds the given three color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add ( Color24  a,
Color24  b,
Color24  c,
Color24  d 
)
inline

Adds the given four color Swatch to the end of the palette, returning its index. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add3 ( Color24  rgb)
inline

Adds a swatch containing the given color for the first three components, with transparency for the fourth. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add3 ( byte  r,
byte  g,
byte  b 
)
inline

Adds a swatch containing the given color for the first three components, with transparency for the fourth. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add4 ( Color24  clr)
inline

Adds a swatch containing the given color for all four components. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.Add4 ( byte  r,
byte  g,
byte  b 
)
inline

Adds a swatch containing the given color for all four components. If the Swatch is already contained within the palette, the existing Swatch's index is returned without creating a duplicate entry.

SwatchIndex GameAPI.BudgetBoy.PaletteBuilder.AddNESPalette ( )
inline

Adds 64 swatches that approximate the NES palette, returning the index of the first color.

Property Documentation

Swatch GameAPI.BudgetBoy.PaletteBuilder.this[SwatchIndex index]
getset

Gets or sets the Swatch corresponding to the given SwatchIndex.