ImageEn, unit iegdiplus

TIECanvas.Create

TIECanvas.Create


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.Width := 3;
  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( 650, 680, 850, 780 ));
iec.Free();