次の方法で共有


DynamicRenderer.DrawingAttributes プロパティ

DynamicRenderer オブジェクトが使用する DrawingAttributes オブジェクトを取得または設定します。

名前空間 :  Microsoft.StylusInput
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public Property DrawingAttributes As DrawingAttributes
'使用
Dim instance As DynamicRenderer
Dim value As DrawingAttributes

value = instance.DrawingAttributes

instance.DrawingAttributes = value
public DrawingAttributes DrawingAttributes { get; set; }
public:
property DrawingAttributes^ DrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
public DrawingAttributes get_DrawingAttributes()
/** @property */
public  void set_DrawingAttributes(DrawingAttributes value)
public function get DrawingAttributes () : DrawingAttributes
public function set DrawingAttributes (value : DrawingAttributes)

プロパティ値

型 : Microsoft.Ink.DrawingAttributes
DynamicRenderer オブジェクトが使用する DrawingAttributes オブジェクト。

解説

ユーザーがストロークを描画している間にこのプロパティが変更されると、新しい描画属性は現在のストロークに適用されず、次に描画されるストロークで有効になります。たとえば、このプロパティを IStylusAsyncPlugin 実装の StylusDown メソッドで設定しても、作成中のプロセスにあるストロークには影響しません。

DisplaySettingsChanged イベントが発生したときは、DisplaySettingsChanged イベント ハンドラで DrawingAttributes オブジェクトの Width プロパティと Height プロパティを再計算します。これは、DisplaySettingsChanged イベントの結果として発生した解像度 (dpi) の変更を考慮に入れるために必要です。

描画属性の既定値は次のようになります。

描画属性

AntiAliased

true

Color

Color.Black

FitToCurve

false

Height

1

IgnorePressure

false

PenTip

Ball

RasterOperation

RasterOperation

Transparency

0

Width

53

この C# の例では、DynamicRenderer オブジェクト theDynamicRenderer を使用して、動的にレンダリングされるストロークの色を赤に設定します。

theDynamicRenderer.DrawingAttributes.Color = Color.Red;

この Visual Basic .NET の例では、DynamicRenderer オブジェクト theDynamicRenderer を使用して、動的にレンダリングされるストロークの色を赤に設定します。

theDynamicRenderer.DrawingAttributes.Color = Color.Red

プラットフォーム

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

DynamicRenderer クラス

DynamicRenderer メンバ

Microsoft.StylusInput 名前空間

Stroke.DrawingAttributes