TIEBitmap.CanvasCurrentAlpha
TIEBitmap.CanvasCurrentAlpha
Declaration
property CanvasCurrentAlpha: integer
Description
Setting this property to a value >=0, makes the alpha channel an 8 bit gray scale paintable bitmap.
This means that you can draw on the alpha channel using TCanvas object.
The value (0..255) specifies the transparency, 0=fully transparent, 255=fully opaque.
Default: -1
ImageEnView1.IEBitmap.AlphaChannel.CanvasCurrentAlpha := 128;
with ImageEnView1.IEBitmap.AlphaChannel.Canvas do
begin
FillRect(0, 0, 100, 100);
Ellipse(10, 10, 200, 200);
end;
// Draw a line on the IEBitmap canvas and ensure it also make opaque on the transparency
With ImageEnView1 do
begin
IEBitmap.Canvas.Pen.Color := clRed;
IEBitmap.Canvas.MoveTo( 10, 10 ) ;
IEBitmap.Canvas.LineTo( 100, 100 );
IEBitmap.AlphaChannel.CanvasCurrentAlpha := 255;
IEBitmap.AlphaChannel.Canvas.MoveTo( 10, 10 ) ;
IEBitmap.AlphaChannel.Canvas.LineTo( 100, 100 );
Update();
end