Поделиться через


InkPicture.DefaultDrawingAttributes - свойство

Обновлен: Ноябрь 2007

Gets or sets the default DrawingAttributes object, which specifies the drawing attributes that are used when drawing and displaying ink.

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
<BrowsableAttribute(False)> _
Public Property DefaultDrawingAttributes As DrawingAttributes
'Применение
Dim instance As InkPicture
Dim value As DrawingAttributes

value = instance.DefaultDrawingAttributes

instance.DefaultDrawingAttributes = value
[BrowsableAttribute(false)]
public DrawingAttributes DefaultDrawingAttributes { get; set; }
[BrowsableAttribute(false)]
public:
property DrawingAttributes^ DefaultDrawingAttributes {
    DrawingAttributes^ get ();
    void set (DrawingAttributes^ value);
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public DrawingAttributes get_DefaultDrawingAttributes()
/** @property */
/** @attribute BrowsableAttribute(false) */
public  void set_DefaultDrawingAttributes(DrawingAttributes value)
public function get DefaultDrawingAttributes () : DrawingAttributes
public function set DefaultDrawingAttributes (value : DrawingAttributes)

Значение свойства

Тип: Microsoft.Ink.DrawingAttributes
The default DrawingAttributes object, which specifies the drawing attributes that are used when drawing and displaying ink.

Заметки

The drawing attributes specified with this property are the attributes that are assigned to a new cursor.

The default drawing attributes are as follows:

Property

Description

AntiAliased

true

Color

Black

FitToCurve

false

Height

1 (in ink space units)

IgnorePressure

false

PenTip

PenTip

RasterOperation

CopyPen

Transparency

0 (totally opaque)

Width

53 (in ink space units)

To set different attributes on a new cursor, use the DrawingAttributes property of the Cursor object.

To change the drawing attributes of a single stroke, use the DrawingAttributes property of the Stroke object. To change the drawing attributes of a collection of strokes, call the ModifyDrawingAttributes method of the Strokes collection.

ms582185.alert_note(ru-ru,VS.90).gifПримечание.

The DefaultDrawingAttributes property contains the drawing attributes that all cursors use unless they set their own DrawingAttributes property. For example, a new Cursor object uses DefaultDrawingAttributes, and an old Cursor object on which the DefaultDrawingAttributes is set to nullссылка null (Nothing в Visual Basic) also uses DefaultDrawingAttributes.

Примеры

This C# example sets some of the default drawing attributes of an InkPicture control.

[C#]

using Microsoft.Ink;
//. . .
InkPicture theInkPicture = new InkPicture();

// Set the initial Width attribute to thin
theInkPicture.DefaultDrawingAttributes.Width = 30;

// Set the initial Color attribute to Black
theInkPicture.DefaultDrawingAttributes.Color = Color.Black;

// Set the initial RasterOperation attribute to CopyPen
theInkPicture.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen;

// Set the initial Transparency attribute to opaque (0)
theInkPicture.DefaultDrawingAttributes.Transparency = 0;

// Set the initial AntiAliased attribute to true
theInkPicture.DefaultDrawingAttributes.AntiAliased = true;

This Microsoft® Visual Basic® .NET example sets some of the default drawing attributes of an InkPicture control.

[Visual Basic]

Imports Microsoft.Ink
'. . .
Dim theInkCollector As New InkCollector()

'Set the initial Width attribute to thin
theInkCollector.DefaultDrawingAttributes.Width = 30

'Set the initial Color attribute to Black
theInkCollector.DefaultDrawingAttributes.Color = Color.Black

'Set the initial RasterOperation attribute to CopyPen
theInkCollector.DefaultDrawingAttributes.RasterOperation = RasterOperation.CopyPen

'Set the initial Transparency attribute to opaque (0)
theInkCollector.DefaultDrawingAttributes.Transparency = 0

'Set the initial AntiAliased attribute to true
theInkCollector.DefaultDrawingAttributes.AntiAliased = True

Платформы

Windows Vista

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

InkPicture Класс

InkPicture - члены

Microsoft.Ink - пространство имен

DrawingAttributes

Cursor.DrawingAttributes

Stroke.DrawingAttributes

Strokes.ModifyDrawingAttributes