次の方法で共有


DrawingAttributes.FitToCurve Property

DrawingAttributes.FitToCurve Property

Gets or sets the value that indicates whether Bezier smoothing is used to render ink.

Definition

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

Property Value

System.Boolean. The value that indicates whether Bezier smoothing is used to render ink.

This property is read/write.

true Ink is rendered as a series of curves.
false Default. Ink is rendered as lines between pen sample points.

Remarks

Bezier smoothing is especially useful for smoothing the ink in scenarios when writing may be unsteady, such as when a user is standing.

If you set the FitToCurve property while collecting ink, the ink does not render as a series of curves until the strokes are redrawn or refreshed.

Examples

[C#]

This C# example uses a menu item's event handler, menuInkFitToCurve_Click, to toggle the FitToCurve property on and off.

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

[VB.NET]

This Microsoft® Visual Basic® .NET example uses a menu item's event handler, MenuInkFitToCurve_Click, to toggle the FitToCurve property on and off.

Imports Microsoft.Ink
'...
    Dim MenuInkFitToCurve As System.Windows.Forms.MenuItem
    Dim theInkCollector As InkCollector
'...
    Private Sub MenuInkFitToCurve_Click( _
    ByVal sender As Object, ByVal e As System.EventArgs)
        MenuInkFitToCurve.Checked = Not MenuInkFitToCurve.Checked
        theInkCollector.DefaultDrawingAttributes.FitToCurve = _
            MenuInkFitToCurve.Checked
        Refresh()
    End Sub
                

See Also