InkDrawingAttributes 클래스

정의

InkStroke 그리기와 연결된 속성을 제공합니다.

public ref class InkDrawingAttributes sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class InkDrawingAttributes final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class InkDrawingAttributes final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class InkDrawingAttributes
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class InkDrawingAttributes
function InkDrawingAttributes()
Public NotInheritable Class InkDrawingAttributes
상속
Object Platform::Object IInspectable InkDrawingAttributes
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

다음 예제에서는 InkManager 개체(inkManager)에서 관리하는 모든 스트로크에 대한 기본 그리기 특성을 설정하는 방법을 보여 줍니다.

// Create the InkManager instance.
Windows.UI.Input.Inking.InkManager inkManager = 
  new Windows.UI.Input.Inking.InkManager();
Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes = 
  new Windows.UI.Input.Inking.InkDrawingAttributes();
// True is the Default value for fitToCurve.
drawingAttributes.FitToCurve = false;
// Set color to red (default is black).
drawingAttributes.Color = Windows.UI.Colors.CornflowerBlue;
inkManager.SetDefaultDrawingAttributes(drawingAttributes);

다음 예제에서는 특정 스트로크에 대한 그리기 특성을 설정하는 방법을 보여 줍니다.

참고

스트로크의 DrawingAttributes 속성을 직접 설정할 수 없습니다. 스트로크의 InkDrawingAttributes 복사본을 만들고, 해당 InkDrawingAttributes 개체에 대해 원하는 값을 설정한 다음, 여기에 표시된 것처럼 새 InkDrawingAttributes를 스트로크의 DrawingAttributes 에 할당해야 합니다.

// Get the InkStroke objects.
IReadOnlyList<InkStroke> inkStrokes = inkManager.GetStrokes();
Windows.UI.Input.Inking.InkStroke cloneStroke = 
  inkStrokes.GetAt(index).Clone();
Windows.UI.Input.Inking.InkDrawingAttributes drawingAttributes = 
  cloneStroke.DrawingAttributes;
drawingAttributes.PenTip = Windows.UI.Input.Inking.PenTipShape.Rectangle;
cloneStroke.DrawingAttributes = drawingAttributes;

설명

InkDrawingAttributes는 InkManager 개체 또는 InkStrokeBuilder 개체의 SetDefaultDrawingAttributes 메서드를 통해 전역적으로 설정할 수 있습니다. DrawingAttributes 속성을 통해 개별 InkStroke 개체에 설정할 수도 있습니다.

버전 기록

Windows 버전 SDK 버전 추가된 값
1607 14393 CreateForPencil
1607 14393 종류
1607 14393 PencilProperties
1703 15063 IgnoreTilt
1803 17134 ModelerAttributes

생성자

InkDrawingAttributes()

InkStroke 특성을 지정하는 데 사용되는 새 InkDrawingAttributes 개체를 만듭니다.

속성

Color

InkStroke의 색을 나타내는 값을 가져오거나 설정합니다.

DrawAsHighlighter

InkStroke가 형광펜 오버레이로 렌더링되는지 여부를 나타내는 값을 가져오거나 설정합니다. 스트로크는 일반적으로 노란색과 같은 밝은 색으로 설정됩니다.

FitToCurve

Bezier 곡선 또는 직선 세그먼트 컬렉션이 InkStroke를 그리는 데 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다.

IgnorePressure

InkStroke를 그릴 때 디지타이저 표면의 접촉 압력이 무시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

IgnoreTilt

InkStroke를 그릴 때 디지타이저 표면에서 접촉의 기울기(틸트,틸티)가 무시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

Kind

특정 유형의 InkStroke 특성을 설명하는 InkDrawingAttributes를 가져옵니다.

ModelerAttributes

잉크 스트로크의 modeler 속성에 액세스하기 위한 ModelerAttributes 개체의 instance 가져옵니다.

PencilProperties

특성 속성을 연필 스트로크로 설정하기 위한 InkDrawingAttributesPencilProperties 개체의 instance 가져옵니다.

PenTip

InkStroke를 그릴 때 펜 팁의 모양을 나타내는 값을 가져오거나 설정합니다.

PenTipTransform

InkStroke에 사용되는 PenTipShape에 적용된 아핀 변환 행렬을 가져오거나 설정합니다.

Size

InkStroke를 그리는 데 사용되는 펜 팁(PenTip)의 크기를 나타내는 값을 가져오거나 설정합니다.

메서드

CreateForPencil()

연필 특성을 사용하여 잉크 스트로크를 렌더링하기 위한 InkDrawingAttributes 개체를 만듭니다.

적용 대상

추가 정보