[fpc-devel] proposal for palette-related graph unit interface changes

Tomas Hajny XHajT03 at hajny.biz
Wed Sep 15 17:27:20 CEST 2010


On Wed, September 15, 2010 16:39, Nikolay Nikolov wrote:
>   Currently, the following palette-related things from the fpc graph
> unit aren't TP7 compatible:
>
> MaxColors (constant)
> PaletteType (record)
>
> procedure SetAllPalette(const Palette: PaletteType);
> procedure GetPalette(var Palette: PaletteType);
> function GetPaletteSize: smallint;
> procedure GetDefaultPalette(var Palette: PaletteType);
 .
 .
> so the main difference is that fpc's PaletteType represents a VGA 256 to
> RGB colour palette, while TP7's represents EGA's 16->64 palette. My
> proposal is to rename:
>
> MaxColor -> RGBPaletteMaxColor
> PaletteType -> RGBPaletteType
> SetAllPalette -> SetAllRGBPalette
> GetPalette -> GetAllRGBPalette
> GetDefaultPalette -> GetDefaultRGBPalette
> GetPaletteSize -> GetRGBPaletteSize (this one might be unnecessary -
> will have to check if GetPaletteSize already returns the same values as
> TP7; we might still introduce GetRGBPaletteSize for consistency with the
> other RGBPalette procedures/functions, though)
 .
 .

Regardless of outcomes of discussion whether some change would be
appropriate at all or not, I believe that it may be better not to rename
the existing procedures and functions using the PaletteType but rather
provide overloaded versions of those calls.

Tomas





More information about the fpc-devel mailing list