Поделиться через


DrawingAttributes.FitToCurve - свойство

Обновлен: Ноябрь 2007

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

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
Public Property FitToCurve As Boolean
'Применение
Dim instance As DrawingAttributes
Dim value As Boolean

value = instance.FitToCurve

instance.FitToCurve = value
public bool FitToCurve { get; set; }
public:
property bool FitToCurve {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_FitToCurve()
/** @property */
public  void set_FitToCurve(boolean value)
public function get FitToCurve () : boolean
public function set FitToCurve (value : boolean)

Значение свойства

Тип: System.Boolean
true if Ink is rendered as a series of curves. false if Ink is rendered as lines between pen sample points.

Заметки

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.

Примеры

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

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

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

DrawingAttributes Класс

DrawingAttributes - члены

Microsoft.Ink - пространство имен

Stroke.GetFlattenedBezierPoints

Stroke