Unit PalUnit |
///////////////////////////////////////////////////////////////////////////// // Palette management routines // ŠJohn Biddiscombe // j.biddiscombe@rl.ac.uk // // /////////////////////////////////////////////////////////////////////////////
Classes |
Functions |
create_256_identity_palette_from_file -
create_256_pens_using_paletteindex - Create pens from palette.
create_default_236_greyscale_palette -
default_log_palette -
DirectoryExists - fills a TStringlist with palettes - useful for listboxes
dispose_256_pens -
find_all_palettes -
LogPal_to_RGBQuad -
Set_Palette_Directory -
Types |
palentries
palindices
pen_array
pMyBitmapInfo
Ppalentries
pPens
RGBdouble
RGBQuads
RGBvalues
TMyBitmapInfo
TMyLogPalette
Constants |
Variables |
Functions |
Types |
palentries = array[0..255] of TPaletteEntry;Mine
palindices = array[0..255] of word;
pen_array = array[0..255] of integer;C++Builder screws up typedefs - so use int instead of HPen,HPalette
pMyBitmapInfo = ^TMyBitmapInfo
Ppalentries = ^palentries
pPens = ^pen_array
RGBdouble = recordA rather odd object used for nicccce.....palette walking in Zonerings
r : double;
g : double;
b : double;
end;
RGBQuads = array[0..255] of TRGBQUAD;
RGBvalues = record
r : integer;
g : integer;
b : integer;
end;
TMyBitmapInfo = record
BMIheader : TBITMAPINFOHEADER;
BMIcolors : palindices;
end;
TMyLogPalette = record
palVersion : Word;
palNumEntries : Word;
palEntry : palentries;
pal_mycolours : integer;
end;
Constants |
Variables |