DrawingAttributes.AntiAliased Property

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

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

Syntax

'Declaration
Public Property AntiAliased As Boolean
'Usage
Dim instance As DrawingAttributes 
Dim value As Boolean 

value = instance.AntiAliased

instance.AntiAliased = value
public bool AntiAliased { get; set; }
public:
property bool AntiAliased {
    bool get ();
    void set (bool value);
}
public function get AntiAliased () : boolean 
public function set AntiAliased (value : boolean)

Property Value

Type: System.Boolean
true if the stroke is antialiased; otherwise, false.

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

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();
    }

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

Platforms

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

DrawingAttributes Class

DrawingAttributes Members

Microsoft.Ink Namespace

Stroke