DrawingAttributes Constructor (Single)
Initializes a new instance of the DrawingAttributes class using the specified width.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
Public Sub New ( _
width As Single _
)
'Usage
Dim width As Single
Dim instance As New DrawingAttributes(width)
public DrawingAttributes(
float width
)
public:
DrawingAttributes(
float width
)
public function DrawingAttributes(
width : float
)
Parameters
width
Type: System.SingleThe specific pen width to which the DrawingAttributes object is initialized.
Remarks
The width of the pen is in HIMETRIC units.
When modifying drawing attributes for a stroke, try to reuse an existing DrawingAttributes object rather than creating a new one each time. Creating a new DrawingAttributes object allocates memory that remains with the Ink object past the lifetime of the DrawingAttributes object.
Examples
This C# example initializes a new instance of the DrawingAttributes class, theDrawingAttributes, with a Width of 200 HIMETRIC units.
DrawingAttributes theDrawingAttributes = new DrawingAttributes(200);
This Microsoft Visual Basic .NET example initializes a new instance of the DrawingAttributes class, theDrawingAttributes, with a Width of 200 HIMETRIC units.
Dim theDrawingAttributes As New DrawingAttributes(200)
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0