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

If a Bitmap is specified, it is used when the bitmap's attributes (such as pixel format, color palette, or alpha channel information) might affect rendering.

GDI+ Method: GdipCreateFromHDC

Examples

// Draw an anti-aliased ellipse onto a TBitmap
cv := TIECanvas.Create( ABitmap.Canvas );
cv.Pen.Style := psSolid;
cv.Pen.Width := 3;
cv.Pen.Mode  := pmCopy;
cv.Pen.Color := clRed;
cv.Brush.Style := bsClear;
cv.Ellipse( Rect( 100, 100, 200, 200 ));
cv.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();