Vcl.Imaging.GIFImg.TGIFColorMap.IndexOf

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IndexOf(Color: TColor): integer;

C++

int __fastcall IndexOf(System::Uitypes::TColor Color);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Imaging.GIFImg.pas
Vcl.Imaging.GIFImg.hpp
Vcl.Imaging.GIFImg TGIFColorMap

Description

Returns the index of the given color in the Colors array.

Call IndexOf to obtain the zero-based index of the color specified through Color in the Colors array.

If no color with the specified value is found, IndexOf returns -1.

Because Color is of type TColor, the Color2RGB routine is first used to convert Color to the TGIFColor type, which is the type of the elements in the Colors array.

See Also