Compartir a través de


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);
}
/** @property */
public boolean get_AntiAliased ()

/** @property */
public void set_AntiAliased (boolean value)
public function get AntiAliased () : boolean

public function set AntiAliased (value : boolean)
Not applicable.

Property Value

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.

Example

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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

DrawingAttributes Class
DrawingAttributes Members
Microsoft.Ink Namespace
Stroke