다음을 통해 공유


Ink.CreateStroke 메서드 (array<Point[])

업데이트: 2007년 11월

Point 입력 값 배열에서 Stroke 개체를 만듭니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
Public Function CreateStroke ( _
    points As Point() _
) As Stroke
‘사용 방법
Dim instance As Ink
Dim points As Point()
Dim returnValue As Stroke

returnValue = instance.CreateStroke(points)
public Stroke CreateStroke(
    Point[] points
)
public:
Stroke^ CreateStroke(
    array<Point>^ points
)
public Stroke CreateStroke(
    Point[] points
)
public function CreateStroke(
    points : Point[]
) : Stroke

매개 변수

반환 값

형식: Microsoft.Ink.Stroke
새로 만든 스트로크입니다.
새로 만든 Stroke 개체입니다.

설명

점 배열에 있는 점의 최소 및 최대값은 각각 System.Int32.MinValueSystem.Int32.MaxValue 필드입니다. 하지만 이러한 점은 해당 최대 너비나 높이가 System.Int32.MaxValue를 초과할 수 없는 잉크 공간 사각형을 정의합니다. 따라서 최소 및 최대 X 좌표 또는 최소 및 최대 Y 좌표 간의 차이는 System.Int32.MaxValue를 초과할 수 없습니다.

예제

이 예제에서는 Ink 개체에 Stroke 개체를 만듭니다. 스트로크는 잉크 영역의 왼쪽 모퉁이에서 오른쪽 아래쪽 모퉁이까지 이어집니다.

' get the bottom right point of the client area for ink
' Note: InkOverlay.AttachedControl property must be set
Dim bottomRight As Point = New Point(mInkOverlay.AttachedControl.ClientSize)
' convert to HIMETRIC units
Using g As Graphics = mInkOverlay.AttachedControl.CreateGraphics()
    mInkOverlay.Renderer.PixelToInkSpace(g, bottomRight)
End Using
' create the stroke
Dim strokePoints As Point() = New Point(1) {New Point(0), bottomRight}
mInkOverlay.Ink.CreateStroke(strokePoints)
mInkOverlay.AttachedControl.Invalidate()
// get the bottom right point of the client area for ink
// Note: InkOverlay.AttachedControl property must be set
Point bottomRight = new Point(mInkOverlay.AttachedControl.ClientSize);
// convert to HIMETRIC units
using (Graphics g = mInkOverlay.AttachedControl.CreateGraphics())
{
    mInkOverlay.Renderer.PixelToInkSpace(g, ref bottomRight);
}
// create the stroke
Point[] strokePoints = new Point[2] { new Point(0), bottomRight };
mInkOverlay.Ink.CreateStroke(strokePoints);
mInkOverlay.AttachedControl.Invalidate();

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

Ink 클래스

Ink 멤버

CreateStroke 오버로드

Microsoft.Ink 네임스페이스

Stroke

TabletPropertyDescriptionCollection.InkToDeviceScaleX

TabletPropertyDescriptionCollection.InkToDeviceScaleY

Ink.CreateStrokes

Ink.DeleteStroke

Ink.DeleteStrokes