Transparent example for Delphi
var
x, y: Integer;
begin
//set the backcolor of the control to BLUE
LEADRasterView1.BackColor:= 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 to 99 do
begin
for x:= 0 to 24 do
LEADRasterView1.Raster.Pixel [x, y]:= RGB (255, 0, 0 );
for x:= 25 to 74 do
LEADRasterView1.Raster.Pixel[x, y]:= RGB (0, 255, 0 );
for x:= 75 to 99 do
LEADRasterView1.Raster.Pixel[x, y]:= RGB (0, 0, 255 );
end;
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;
end;