DrawingOptionsAntiAliasing Property

Gets or sets whether anti-aliasing is enabled when drawing shapes.
Default value: .

See the online help for image examples.

Definition

Namespace: KGySoft.Drawing.Shapes
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 9.0.0
C#
public bool AntiAliasing { get; set; }

Property Value

Boolean

Remarks

When anti-aliasing is enabled, the shapes are drawn with smooth edges, which affects both shape filling and path drawing.

Anti-aliasing uses 16x16 subpixels per pixel to achieve smooth edges. This means that anti-aliased drawing is slower than aliased drawing.

Examples

The following images provide a few examples regarding anti-aliasing:

DescriptionImage Example
Filling a polygon with AntiAliasing = .Polygon fill with AntiAliasing = false.
Filling a polygon with AntiAliasing = .Polygon fill with AntiAliasing = true.
Drawing a Path with AntiAliasing = , FastThinLines = . This is the default configuration of these properties.Path drawn with AntiAliasing = false, FastThinLines = true.
Drawing a Path with AntiAliasing = , FastThinLines = , DrawPathPixelOffset = Half. Note that the lines are more jagged than above.Path drawn with AntiAliasing = false, FastThinLines = false, DrawPathPixelOffset = PixelOffset.Half.
Drawing a Path with AntiAliasing = , DrawPathPixelOffset = Half. The lines are much smoother.Path drawn with AntiAliasing = true, DrawPathPixelOffset = PixelOffset.Half.
Drawing an ellipse with AntiAliasing = , FastThinLines = . The image is zoomed in for better visibility.Zoomed ellipse with AntiAliasing = false, FastThinLines = true.
Drawing an ellipse with AntiAliasing = , FastThinLines = , DrawPathPixelOffset = Half. The image is zoomed in for better visibility.Zoomed ellipse with AntiAliasing = false, FastThinLines = false, DrawPathPixelOffset = PixelOffset.Half.
Drawing an ellipse with AntiAliasing = , DrawPathPixelOffset = Half. The image is zoomed in for better visibility.Zoomed ellipse with AntiAliasing = true.

See Also