Light example for C++ Builder
int max(int value1, int value2)
{
return ( (value1 > value2) ? value1 : value2);
}
int min(int value1, int value2)
{
return ( (value1 < value2) ? value1 : value2);
}
void __fastcall TForm1::LightClick(TObject *Sender)
{
TPoint ptCenter;
ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);
LEADImage1->Light( ptCenter, (int)(max(LEADImage1->BitmapHeight, LEADImage1->BitmapWidth)/2), (int)(min(LEADImage1->BitmapHeight, LEADImage1->BitmapWidth)/2), 0, 50, 0, RGB(255, 255, 255 100, LGT_SPOTLIGHT, 1, 100, 100, RGB(255,255,255) );
}