Share via


InkStrokeBuilder 类

定义

从原始指针输入生成笔划。

注意

对于使用可扩展应用程序标记语言 (XAML) 的通用 Windows 应用,建议使用 InkPresenterInkCanvas 控件,而不是 InkManager

使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 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
继承
Object Platform::Object IInspectable InkStrokeBuilder
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

注意

此类不敏捷,这意味着需要考虑其线程模型和封送处理行为。 有关详细信息,请参阅线程和封送处理 (C++/CX) 和使用多线程环境中的Windows 运行时对象 (.NET)

版本历史记录

Windows 版本 SDK 版本 已添加值
1703 15063 CreateStrokeFromInkPoints (IEnumerable<InkPoint>,Matrix3x2,Nullable<DateTimeOffset>,Nullable<TimeSpan>)

构造函数

InkStrokeBuilder()

创建用于构造 InkStroke 对象的InkStrokeBuilder 对象。

注意

对于使用可扩展应用程序标记语言 (XAML) 的通用 Windows 应用,建议使用 InkPresenterInkCanvas 控件,而不是 InkManager

使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

方法

AppendToStroke(PointerPoint)

向墨迹笔划添加新段。

AppendToStroke 在 InkStroke 生成过程中在 BeginStroke 之后和 EndStroke 之前调用。

注意

InkPresenter 不支持 AppendToStroke。 使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

BeginStroke(PointerPoint)

开始生成墨迹笔划。

注意

InkPresenter 不支持 BeginStroke。 使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

CreateStroke(IIterable<Point>)

坐标数组创建笔划。

注意

InkPresenter 不支持 CreateStroke。 使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

CreateStrokeFromInkPoints(IIterable<InkPoint>, Matrix3x2)

InkPoint 对象的集合创建基本墨迹笔划。

注意

使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

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

InkPoint 对象的集合创建丰富的墨迹笔划。

注意

使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

EndStroke(PointerPoint)

停止生成墨迹笔划。

注意

InkPresenter 不支持 EndStroke。 使用 CreateStrokeFromInkPointsSetDefaultDrawingAttributes 以编程方式为 InkPresenter 生成笔划。

SetDefaultDrawingAttributes(InkDrawingAttributes)

为当前笔划后创建的所有新墨迹笔划设置默认 InkDrawingAttributes

SetDefaultDrawingAttributes 不会影响当前笔划或任何现有笔划。

注意

以编程方式为 InkPresenterInkManager 对象生成笔划时,请使用 SetDefaultDrawingAttributes。

适用于

另请参阅