[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

IPTCPalette

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

A palette of color entries.

Declaration

Source position: paletted.inc line 34

type IPTCPalette = interface

  function Lock;

  

Gets a pointer to the palette data array.

  procedure Unlock;

  

Unlocks the palette color data after a call to Lock.

  procedure Load();

  

Loads the color values to the palette from the color array, specified as argument.

  procedure Save();

  

Saves the palette color values to the color array, specified as argument.

  function Data;

  

Gets a read-only pointer to the palette data array.

  function GetHermesPaletteHandle;

  

end;

Inheritance

IPTCPalette

  

A palette of color entries.

Description

A palette of color entries.

The palette class represents a 256 color palette for 8-bit indexed color formats. Internally each palette object maintains an array of 256 32-bit integer color values packed in ARGB8888 format. Palette objects are typically used to set the surface palette with IPTCSurface.Palette. They are also used, although less frequently, to load and save surface pixels with IPTCSurface.Load and IPTCSurface.Save. And, even less frequently, they are used with the low level pixel copying and conversion routine TPTCCopy.Palette.