مشاركة عبر


InkStrokeBuilder Class

Definition

Builds strokes from raw pointer input.

Note

For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.

Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

public ref class InkStrokeBuilder sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InkStrokeBuilder final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InkStrokeBuilder final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InkStrokeBuilder
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.None)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InkStrokeBuilder
function InkStrokeBuilder()
Public NotInheritable Class InkStrokeBuilder
Inheritance
Object Platform::Object IInspectable InkStrokeBuilder
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Note

This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Version history

Windows version SDK version Value added
1703 15063 CreateStrokeFromInkPoints(IEnumerable<InkPoint>,Matrix3x2,Nullable<DateTimeOffset>,Nullable<TimeSpan>)

Constructors

InkStrokeBuilder()

Creates a new InkStrokeBuilder object that is used to construct InkStroke objects.

Note

For Universal Windows app using Extensible Application Markup Language (XAML), we recommend using InkPresenter and the InkCanvas control instead of InkManager.

Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

Methods

AppendToStroke(PointerPoint)

Adds a new segment to the ink stroke.

AppendToStroke is called after BeginStroke and before EndStroke during the InkStroke building process.

Note

AppendToStroke is not supported by InkPresenter. Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

BeginStroke(PointerPoint)

Starts building the ink stroke.

Note

BeginStroke is not supported by InkPresenter. Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

CreateStroke(IIterable<Point>)

Creates a stroke from an array of Point coordinates.

Note

CreateStroke is not supported by InkPresenter. Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

CreateStrokeFromInkPoints(IIterable<InkPoint>, Matrix3x2, IReference<DateTime>, IReference<TimeSpan>)

Creates a rich ink stroke from collection of InkPoint objects.

Note

Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

CreateStrokeFromInkPoints(IIterable<InkPoint>, Matrix3x2)

Creates a basic ink stroke from collection of InkPoint objects.

Note

Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

EndStroke(PointerPoint)

Stops building the ink stroke.

Note

EndStroke is not supported by InkPresenter. Use CreateStrokeFromInkPoints and SetDefaultDrawingAttributes to programmatically build strokes for an InkPresenter.

SetDefaultDrawingAttributes(InkDrawingAttributes)

Sets the default InkDrawingAttributes for all new ink strokes created after the current stroke.

SetDefaultDrawingAttributes does not affect the current stroke, or any existing strokes.

Note

Use SetDefaultDrawingAttributes when programmatically building strokes for both InkPresenter and InkManager objects.

Applies to

See also