指定した Color オブジェクトを使用して、DrawingAttributes クラスの新しいインスタンスを初期化します。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public Sub New ( _
color As Color _
)
'使用
Dim color As Color
Dim instance As New DrawingAttributes(color)
public DrawingAttributes(
Color color
)
public:
DrawingAttributes(
Color color
)
public DrawingAttributes(
Color color
)
public function DrawingAttributes(
color : Color
)
パラメータ
- color
型 : System.Drawing.Color
DrawingAttributes オブジェクトが初期化される特定の色。
解説
ストロークの描画属性を変更する場合は、毎回新しいオブジェクトを作成するのではなく、既存の DrawingAttributes オブジェクトを再利用してみてください。新しい DrawingAttributes オブジェクトを作成すると、DrawingAttributes オブジェクトの有効期間を超えて、Ink オブジェクトに残されたメモリが割り当てられます。
例
この C# の例では、特定の色を使用して、DrawingAttributes クラス theDrawingAttributes の新しいインスタンスを初期化します。
DrawingAttributes theDrawingAttributes = new DrawingAttributes(Color.Red);
この Microsoft Visual Basic.NET の例では、特定の色を使用して、DrawingAttributes クラス theDrawingAttributes の新しいインスタンスを初期化します。
Dim theDrawingAttributes As New DrawingAttributes(Color.Red)
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0