Declaration
property IECanvas: TIECanvas;
Description
Returns the
IECanvas to allow you to perform drawing operations on the image.
Note:
◼If the bitmap is attached to a
TImageEnView, ensure that you call
Update after drawing to the canvas
◼Accessing the IECanvas property wil automatically convert the
bitmap location ieTBitmap
◼A
VCL Canvas is also available
Examples
// Draw an anti-aliased ellipse onto a TIEBitmap
with iebmp.IECanvas do
begin
Pen.Style := psSolid;
Pen.Mode := pmCopy;
Pen.Color := clRed;
Brush.Style := bsClear
Ellipse( Rect( 100, 100, 200, 200 ));
end;
// Highlight an area of an image
ImageEnView1.IEBitmap.IECanvas.Brush.Color := clYellow;
ImageEnView1.IEBitmap.IECanvas.Brush.Style := bsSolid;
ImageEnView1.IEBitmap.IECanvas.Brush.Transparency := 125;
ImageEnView1.IEBitmap.IECanvas.FillRect( Rect( 100, 100, 300, 300 );
ImageEnView1.Update();
// Create a shaped image, by drawing a letter to the canvas of the Alpha channel
ImageEnView1.IO.LoadFromFile( 'D:\Testing_Multimedia\Sub-100KB\Sunset 2.jpg' );
ImageEnView1.IEBitmap.AlphaChannel.Fill( clBlack );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Font.Height := ImageEnView1.IEBitmap.Height;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Font.Style := [fsBold];
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Font.Color := clWhite;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'Q', Rect( 0, 0, ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height ), iejCenter );
ImageEnView1.Update();
