다음을 통해 공유


InkPicture.DefaultDrawingAttributes 속성

업데이트: 2007년 11월

잉크를 그리고 표시할 때 사용되는 그리기 특성을 지정하는 기본 DrawingAttributes 개체를 가져오거나 설정합니다.

네임스페이스:  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
잉크를 그리고 표시할 때 사용되는 그리기 특성을 지정하는 기본 DrawingAttributes 개체입니다.

설명

이 속성을 통해 지정되는 그리기 특성은 새 커서에 할당되는 특성입니다.

기본 그리기 특성은 다음과 같습니다.

속성

설명

AntiAliased

true

Color

Black

FitToCurve

false

Height

1(잉크 공간 단위)

IgnorePressure

false

PenTip

PenTip

RasterOperation

CopyPen

Transparency

0(완전히 불투명)

Width

53(잉크 공간 단위)

새 커서에 다른 특성을 설정하려면 Cursor 개체의 DrawingAttributes 속성을 사용합니다.

단일 스트로크의 그리기 특성을 변경하려면 Stroke 개체의 DrawingAttributes 속성을 사용합니다. 스트로크 컬렉션의 그리기 특성을 변경하려면 Strokes 컬렉션의 ModifyDrawingAttributes 메서드를 호출합니다.

참고

DefaultDrawingAttributes 속성에는 DrawingAttributes 속성을 자체적으로 설정하지 않는 모든 커서에 사용되는 그리기 특성이 들어 있습니다. 예를 들어 새 Cursor 개체는 DefaultDrawingAttributes를 사용하고, DefaultDrawingAttributes가 nullNull 참조(Visual Basic의 경우 Nothing)로 설정된 이전 Cursor 개체도 DefaultDrawingAttributes를 사용합니다.

예제

이 C# 예제에서는 InkPicture 컨트롤의 기본 그리기 특성 중 일부를 설정합니다.

[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;

이 Microsoft® Visual Basic® .NET 예제에서는 InkPicture 컨트롤의 기본 그리기 특성 중 일부를 설정합니다.

[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