...

Chasys Draw IES Help:


SDK - Layer Attachments - CPAL
 

Using the CPAL meta-type

The CPAL attachment allows plug-ins that load files with palettes to share those palettes with Chasys Draw IES. Such palettes may be used to populate the Palette window in the user interface for Chasys Draw IES. The metadata consists of a host-defined structure of a fixed length:

struct meta_tag_CPAL
{
    unsigned short  version;
    unsigned short  count;
    unsigned char   unused_1;
    unsigned char   colors[256];
};

The plug-in requests metadata of size sizeof(meta_tag_CPAL). The plug-in then proceeds to fill the structure with the colors in the palette, the number of colors and the version of the structure.