Declaration
constructor Create(Canvas: TCanvas; AntiAlias: boolean = True; UseGDIPlus: boolean = True; Bitmap: TBitmap = nil);
Description
Create a
TIECanvas object.
If AntiAlias is false:
-
SmoothingMode is set to iesmBestPerformance
-
TextRendering is set to ietrTextRenderingHintSystemDefault
GDI+ Method: GdipCreateFromHDC
Examples
// Draw an anti-aliased ellipse onto a TBitmap
iec := TIECanvas.Create( ABitmap.Canvas );
with iec do
begin
Pen.Style := psSolid;
Pen.Mode := pmCopy;
Pen.Color := clRed;
Brush.Style := bsClear
Ellipse( Rect( 100, 100, 200, 200 ));
end;
iec.Free;
// Highlight an area of a bitmap
iec := TIECanvas.Create( Bitmap.Canvas, false );
iec.Brush.Color := clRed;
iec.Brush.Style := bsSolid;
iec.Brush.Transparency := 125;
iec.FillRect( Rect( 100, 100, 300, 300 );
iec.Free;