Declaration
property SmoothingMode: TIECanvasSmoothingMode;
Description
Specify whether smoothing (antialiasing) is applied to lines and curves and the edges of filled areas.
iesmDefault, iesmBestPerformance and iesmNone specify that smoothing is not applied.
iesmBestRenderingQuality, iesmAntialias specify that smoothing is applied using an 8x4 box filter.
iesmAntialias8x8 specifies that smoothing is applied using an 8x8 box filter.
GDI+ Method:
GdipSetSmoothingModeDefault: iesmBestRenderingQuality
Comparison
const
Count = 6;
SmoothingModeStr: array[iesmDefault..iesmAntialias8x8] of string = (
'iesmDefault', 'iesmBestPerformance', 'iesmBestRenderingQuality',
'iesmNone', 'iesmAntialias', 'iesmAntialias8x8' );
Ellipse_Width = 200;
Ellipse_Height = 100;
Margin = 20;
Text_Offset = 5;
var
sm: TIECanvasSmoothingMode;
y: Integer;
begin
ImageEnView1.IEBitmap.Allocate( Ellipse_Width + 2 * Margin, Count * ( Ellipse_Height + Margin ) + Margin, clWhite );
y := Margin;
for sm := iesmDefault to iesmAntialias8x8 do
begin
ImageEnView1.IEBitmap.IECanvas.SmoothingMode := sm;
// Border
ImageEnView1.IEBitmap.IECanvas.Pen.Style := psSolid;
ImageEnView1.IEBitmap.IECanvas.Pen.Color := clBlue;
ImageEnView1.IEBitmap.IECanvas.Pen.Width := 5;
// Fill
ImageEnView1.IEBitmap.IECanvas.Brush.Style := bsSolid;
ImageEnView1.IEBitmap.IECanvas.Brush.Color := clYellow;
ImageEnView1.IEBitmap.IECanvas.Ellipse( Margin, y + Margin, Margin + Ellipse_Width, y + Ellipse_Height );
ImageEnView1.IEBitmap.IECanvas.DrawText( SmoothingModeStr[sm], Margin, y - Text_Offset );
inc( y, Ellipse_Height + Margin );
end;
ImageEnView1.Update();
end;
// Set best quality
IECanvas.SmoothingMode := iesmBestRenderingQuality;
// Set best performance
IECanvas.SmoothingMode := iesmBestPerformance;