Share via


DrawingAttributes.AntiAliased Property

DrawingAttributes.AntiAliased Property

Gets or sets the value that indicates whether a stroke is antialiased.

Definition

Visual Basic .NET Public Property AntiAliased As Boolean
C# public bool AntiAliased { get; set; }
Managed C++ public: __property bool* get_AntiAliased();
public: __property void set_AntiAliased(bool*);

Property Value

System.Boolean. The value that indicates whether a stroke is antialiased.

This property is read/write.

true Default. The stroke is antialiased.
false The stroke is not antialiased.

Remarks

If a stroke is antialiased, the foreground and background colors along the edge of the ink are blended to increase the visible smoothness.

Antialiasing improves the quality of rendering by making ink appear smoother and sharper, especially on lower resolution displays. However, antialiasing incurs added performance. Use it judiciously.

Examples

[C#]

This C# example contains a menu handler to toggle antialiasing on and off.

using Microsoft.Ink;
//...
    private System.Windows.Forms.MenuItem menuInkAntialias;
    private InkCollector theInkCollector;
//...
    private void menuInkAntialias_Click(object sender, System.EventArgs e)
    {
        menuInkAntialias.Checked = !menuInkAntialias.Checked;
        theInkCollector.DefaultDrawingAttributes.AntiAliased =
            menuInkAntialias.Checked;
        Refresh();
    }
                

[VB.NET]

This Microsoft® Visual Basic® .NET example contains a menu handler to toggle antialiasing on and off.

Imports Microsoft.Ink
'...
    Private theInkCollector As InkCollector
    Friend menuInkAntialias As System.Windows.Forms.MenuItem
'...
    Private Sub MenuInkAntialias_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    Handles MenuInkAntialias.Click
        MenuInkAntialias.Checked = Not MenuInkAntialias.Checked
        theInkCollector.DefaultDrawingAttributes.AntiAliased = _
            menuInkAntialias.Checked
        Refresh()
    End Sub
                

See Also