InkDrawingAttributes クラス

定義

InkStroke の描画に関連付けられたプロパティを提供します。

public ref class InkDrawingAttributes 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.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InkDrawingAttributes final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InkDrawingAttributes 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.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InkDrawingAttributes
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InkDrawingAttributes
function InkDrawingAttributes()
Public NotInheritable Class InkDrawingAttributes
継承
Object Platform::Object IInspectable InkDrawingAttributes
属性

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 で導入)

次の例では、 InkManager オブジェクト (inkManager) によって管理されるすべてのストロークに既定の描画属性を設定する方法を示します。

// Create the InkManager instance.
Windows.UI.Input.Inking.InkManager inkManager = 
  new Windows.UI.Input.Inking.InkManager();
Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes = 
  new Windows.UI.Input.Inking.InkDrawingAttributes();
// True is the Default value for fitToCurve.
drawingAttributes.FitToCurve = false;
// Set color to red (default is black).
drawingAttributes.Color = Windows.UI.Colors.CornflowerBlue;
inkManager.SetDefaultDrawingAttributes(drawingAttributes);

次の例では、特定のストロークの描画属性を設定する方法を示します。

注意

ストロークの DrawingAttributes プロパティを 直接設定することはできません。 次に示すように、ストロークの InkDrawingAttributes のコピーを作成し、その InkDrawingAttributes オブジェクトに必要な値を設定してから、新しい InkDrawingAttributes をストロークの DrawingAttributes に割り当てる必要があります。

// Get the InkStroke objects.
IReadOnlyList<InkStroke> inkStrokes = inkManager.GetStrokes();
Windows.UI.Input.Inking.InkStroke cloneStroke = 
  inkStrokes.GetAt(index).Clone();
Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes = 
  cloneStroke.DrawingAttributes;
drawingAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Rectangle;
cloneStroke.DrawingAttributes = drawingAttributes;

注釈

InkDrawingAttributes は、InkManager オブジェクトまたは InkStrokeBuilder オブジェクトの SetDefaultDrawingAttributes メソッドを使用してグローバルに設定できます。 また、DrawingAttributes プロパティを使用して、個々の InkStroke オブジェクトに設定することもできます。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1607 14393 CreateForPencil
1607 14393 種類
1607 14393 PencilProperties
1703 15063 IgnoreTilt
1803 17134 ModelerAttributes

コンストラクター

InkDrawingAttributes()

InkStroke 属性を指定するために使用される新しい InkDrawingAttributes オブジェクトを作成します。

プロパティ

Color

InkStroke の色を示す値を取得または設定します。

DrawAsHighlighter

InkStroke が蛍光ペン オーバーレイとしてレンダリングされるかどうかを示す値を取得または設定します。 ストロークは通常、黄色などの明るい色に設定されます。

FitToCurve

ベジェ曲線または直線セグメントのコレクションを使用して InkStroke を描画するかどうかを示す値を取得または設定します。

IgnorePressure

InkStroke を描画するときにデジタイザーサーフェス上の接触の圧力が無視されるかどうかを示す値を取得または設定します。

IgnoreTilt

InkStroke を描画するときに、デジタイザーサーフェス上の接触の傾き (tiltxtilty) が無視されるかどうかを示す値を取得または設定します。

Kind

特定の種類の InkStroke の特性を記述する InkDrawingAttributes を取得します。

ModelerAttributes

インク ストロークのモデラー プロパティにアクセスするための ModelerAttributes オブジェクトのインスタンスを取得します。

PencilProperties

プロパティの特性を鉛筆ストロークに設定するための InkDrawingAttributesPencilProperties オブジェクトのインスタンスを取得します。

PenTip

InkStroke を描画するときのペン先の形状を示す値を取得または設定します。

PenTipTransform

InkStroke に使用される PenTipShape に適用されるアフィン変換マトリックスを取得または設定します。

Size

InkStroke の描画に使用されるペンヒント (ペンヒント) の寸法を示す値を取得または設定します。

メソッド

CreateForPencil()

鉛筆の特性を持つインク ストロークをレンダリングするための InkDrawingAttributes オブジェクトを作成します。

適用対象

こちらもご覧ください