Transparent example for C++ Builder
int x, y;
//set the backcolor of the control to BLUE
LEADRasterView1->BackColor = (TColor)RGB(0, 0, 255);
ShowMessage ("Pause");
//create a 100x100 image
LEADRasterView1->Raster->CreateBitmap (100, 100, 24);
//fill some of the image with RED, the rest with black
LEADRasterView1->AutoRepaint = False;
for (y = 0; y <= 99; y ++)
{
for (x= 0; x<= 24; x ++)
LEADRasterView1->Raster->set_Pixel (x, y, RGB (255, 0, 0 ));
for (x= 25; x <= 74; x++)
LEADRasterView1->Raster->set_Pixel(x, y, RGB (0, 255, 0 ));
for (x= 75; x <= 99; x ++)
LEADRasterView1->Raster->set_Pixel(x, y, RGB (0, 0, 255 ));
}
LEADRasterView1->AutoRepaint = True;
ShowMessage ("Pause");
//now, set Red as the transparent color
LEADRasterView1->Raster->BitmapTransparentColor = RGB(255, 0, 0);
LEADRasterView1->Raster->BitmapEnableTransparency = True;
ShowMessage ("Pause");
//now set the control transparent
LEADRasterView1->Transparent = True;