legacy.video
Class Pallets

java.lang.Object
  extended by legacy.video.Pallets

public class Pallets
extends java.lang.Object

Pallets.class contains a list of standard predifined pallets or swatches generaly used by various systems.
WARNING No PalletFactory contained withing this class performs any checks and will forcably terminate the application if an attempt to apply a pallet to a null RGB pal or RGB pal of invalid length.
WARNING During constuction a call to the PalletFactory exented by Legacy.class and is parsed an pal of a predetmind size. this pal cannot be reinitialized only altered as the VideoAdapter expects this object to be used for the cration of itself. No other pallet can be used.

Author:
Benjamin Tarrant
See Also:
Configuration

Field Summary
static PalletFactory APPLEII_16C
          PalletFactory for classic Apple II 16 color pallet
static PalletFactory C64_16C
          PalletFactory for classic Commodore64 16 color pallet
static PalletFactory CGA
          PalletFactory for classic CGA pallet
static PalletFactory DEFAULT_PALLET
          PalletFactory for custom 256 color pallet
static PalletFactory EGA
          PalletFactory for classic EGA pallet
static PalletFactory GREYSCALE_256C
          PalletFactory for standard 256 greyscale color pallet
static PalletFactory RISC_16C
          PalletFactory for classic Ric 16 color pallet
static PalletFactory TELETEXT
          PalletFactory for standard Teletext 8 color pallet
static PalletFactory VIC20_16C
          PalletFactory for classic Vic20 16 color pallet
static PalletFactory WEB_SAFE
          PalletFactory for standard Web Safe 216 color pallet
static PalletFactory WINDOWS_16C
          PalletFactory for classic Windows 16 color pallet
static PalletFactory WINDOWS_20C
          PalletFactory for extended Windows 20 color pallet
 
Constructor Summary
Pallets()
           
 
Method Summary
static void reducePallet(RGB[] source, RGB[] dest)
          reducePallet reduces an array of colors to fit a destination array of a given size.
Note very costly to use continually reduced an arry by 1 until the desired size is met.
this calls a mehod wich will find first mathces and the closest in wich case it will interpolate the results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CGA

public static final PalletFactory CGA
PalletFactory for classic CGA pallet


EGA

public static final PalletFactory EGA
PalletFactory for classic EGA pallet


WINDOWS_16C

public static final PalletFactory WINDOWS_16C
PalletFactory for classic Windows 16 color pallet


WINDOWS_20C

public static final PalletFactory WINDOWS_20C
PalletFactory for extended Windows 20 color pallet


RISC_16C

public static final PalletFactory RISC_16C
PalletFactory for classic Ric 16 color pallet


TELETEXT

public static final PalletFactory TELETEXT
PalletFactory for standard Teletext 8 color pallet


APPLEII_16C

public static final PalletFactory APPLEII_16C
PalletFactory for classic Apple II 16 color pallet


VIC20_16C

public static final PalletFactory VIC20_16C
PalletFactory for classic Vic20 16 color pallet


C64_16C

public static final PalletFactory C64_16C
PalletFactory for classic Commodore64 16 color pallet


GREYSCALE_256C

public static final PalletFactory GREYSCALE_256C
PalletFactory for standard 256 greyscale color pallet


WEB_SAFE

public static final PalletFactory WEB_SAFE
PalletFactory for standard Web Safe 216 color pallet


DEFAULT_PALLET

public static final PalletFactory DEFAULT_PALLET
PalletFactory for custom 256 color pallet

Constructor Detail

Pallets

public Pallets()
Method Detail

reducePallet

public static final void reducePallet(RGB[] source,
                                      RGB[] dest)
reducePallet reduces an array of colors to fit a destination array of a given size.
Note very costly to use continually reduced an arry by 1 until the desired size is met.
this calls a mehod wich will find first mathces and the closest in wich case it will interpolate the results.

Parameters:
source - array to reduce
dest - out put array