ToTColor

ToTColor converts a palette color to an RGB color.

TColor __fastcall ToTColor(int color);

Description

Use ToTColor to convert an 8-bit palette color specified by color to a color of TColor. ToTColor can only be used after the Ivory Draw component is activated by Active=true and a palette is assigned to the Palette property. If you are trying to call ToTColor when the Ivory Draw palette is not yet initialized, an exception will occur.

If you're using TIvoryCanvas to draw on a surface, you definitely need to specify a color of type TColor. Use ToTColor to convert a palette color to type TColor. The same is true for the BackgroundColor property for a TIvorySurface component.

Back to TIvoryDraw