語言

InkStrokeBuilder 類別

定義

從原始指標輸入建置筆劃。

注意

針對使用 Extensible Application Markup Language (XAML) 的通用 Windows 應用程式,我們建議使用 InkPresenter 和 InkCanvas 控制項,而不是 InkManager。

使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 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 需求

規格需求 Description
裝置系列
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) >

建構函式

名稱 Description
InkStrokeBuilder()

建立用來建構InkStroke物件的新InkStrokeBuilder物件。

注意

針對使用 Extensible Application Markup Language (XAML) 的通用 Windows 應用程式,我們建議使用 InkPresenter 和 InkCanvas 控制項,而不是 InkManager。

使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

方法

名稱 Description
AppendToStroke(PointerPoint)

將新的線段新增至筆墨筆劃。

AppendToStroke 會在 BeginStroke和EndStroke建置程式期間呼叫。

注意

InkPresenter不支援 AppendToStroke。 使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

BeginStroke(PointerPoint)

開始建置筆墨筆劃。

注意

InkPresenter不支援 BeginStroke。 使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

CreateStroke(IIterable<Point>)

從 Point 座標的陣列建立筆劃。

注意

InkPresenter不支援 CreateStroke。 使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

CreateStrokeFromInkPoints(IIterable<InkPoint>, Matrix3x2)

從 InkPoint 物件的集合建立基本筆墨筆劃。

注意

使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

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

從 InkPoint 物件的集合建立豐富的筆墨筆劃。

注意

使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

EndStroke(PointerPoint)

停止建置筆墨筆劃。

注意

InkPresenter不支援 EndStroke。 使用 CreateStrokeFromInkPoints 和 SetDefaultDrawingAttributes 以程式設計方式建置 InkPresenter的筆劃。

SetDefaultDrawingAttributes(InkDrawingAttributes)

設定目前筆劃之後所建立之所有新筆墨筆劃的預設 InkDrawingAttributes 。

SetDefaultDrawingAttributes 不會影響目前的筆劃或任何現有的筆劃。

注意

以程式設計方式建置 InkPresenter 和 InkManager 物件的筆劃時,請使用 SetDefaultDrawingAttributes。

適用於

另請參閱