次の方法で共有


DynamicRenderer.DrawingAttributes Property

DynamicRenderer.DrawingAttributes Property

Gets and sets the DrawingAttributes used by the DynamicRenderer.

Definition

Visual Basic .NET Public Property DrawingAttributes As DrawingAttributes
C# public DrawingAttributes DrawingAttributes { get; set; }
Managed C++ public: __property DrawingAttributes* get_DrawingAttributes();
public: __property void set_DrawingAttributes(DrawingAttributes*);

Property Value

Microsoft.Ink.DrawingAttributes. The DrawingAttributes used by the DynamicRenderer.

This property is read/write. This property has no default value.

Exceptions

ArgumentNullException Leave Site: The DrawingAttributes property cannot be set to null (Nothing in Microsoft® Visual Basic® .NET).
COMException Leave Site:
ObjectDisposedException Leave Site: The DynamicRenderer object is disposed.

Remarks

If this property is changed while a stroke is being drawn, the new drawing attributes will not be applied to the current stroke, but they will take effect on the next stroke to be drawn. For example, setting this property in a StylusDown method of an IStylusAsyncPlugin implementation will not result affect the stroke that is in the process of being created.

When a DisplaySettingsChanged Leave Site event occurs, recalculate the Width and Height properties of the DrawingAttributes object in a DisplaySettingsChanged Leave Site event handler. This is necessary to account for possible dots per inch (dpi) changes that result from the DisplaySettingsChanged Leave Site event.

The following are default values for the drawing attributes:

Drawing Attribute Value
AntiAliased true
Color Color.Black
FitToCurve false
Height 1
IgnorePressure false
PenTip Ball
RasterOperation CopyPen
Transparency 0
Width 53

Examples

[C#]

This C# example shows how to set the dynamically rendered strokes to be the color red, using a DynamicRenderer, theDynamicRenderer.

theDynamicRenderer.DrawingAttributes.Color = Color.Red;

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example shows how to set the dynamically rendered strokes to be the color red, using a DynamicRenderer, theDynamicRenderer.

theDynamicRenderer.DrawingAttributes.Color = Color.Red

See Also