다음을 통해 공유


Ink.CreateStrokes 메서드 (array<Int32[])

업데이트: 2007년 11월

Stroke 개체의 지정된 Id 속성을 기반으로 Strokes를 만듭니다.

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

구문

‘선언
Public Function CreateStrokes ( _
    ids As Integer() _
) As Strokes
‘사용 방법
Dim instance As Ink
Dim ids As Integer()
Dim returnValue As Strokes

returnValue = instance.CreateStrokes(ids)
public Strokes CreateStrokes(
    int[] ids
)
public:
Strokes^ CreateStrokes(
    array<int>^ ids
)
public Strokes CreateStrokes(
    int[] ids
)
public function CreateStrokes(
    ids : int[]
) : Strokes

매개 변수

  • ids
    형식: array<System.Int32[]
    Ink 개체에 있는 Stroke 개체의 지정된 Id 속성 배열입니다. 이러한 Id 값이 지정된 Stroke 개체는 새 Strokes 컬렉션에 추가됩니다. 기본값은 nullNull 참조(Visual Basic의 경우 Nothing)(Microsoft Visual Basic.NET의 경우 Nothing)입니다.

반환 값

형식: Microsoft.Ink.Strokes
Strokes 컬렉션을 반환합니다.

설명

ids 매개 변수가 nullNull 참조(Visual Basic의 경우 Nothing)(Visual Basic .NET의 경우 Nothing) 또는 빈 배열이면 빈 Strokes 컬렉션이 만들어집니다.

예제

이 예제에서는 Id 속성의 배열에서 새 Strokes 컬렉션을 만듭니다. 그런 다음 현재 InkOverlay 개체와 연결된 각 Stroke 개체를 조사하여 Id 속성을 가져옵니다.

' Access to the Ink.Strokes property returns a copy of the Strokes object.
' This copy must be implicitly (via using statement) or explicitly
' disposed of in order to avoid a memory leak.
Using currentStrokes As Strokes = mInkOverlay.Ink.Strokes
    ' Declare an array of integers
    Dim theStrokeIDs(currentStrokes.Count - 1) As Integer
    ' Copy stroke IDs into the array
    For k As Integer = 0 To currentStrokes.Count - 1
        theStrokeIDs(k) = currentStrokes(k).Id
    Next
    ' Create a new collection using the array of stroke IDs
    Dim newStokes As Strokes = mInkOverlay.Ink.CreateStrokes(theStrokeIDs)
End Using
// Access to the Ink.Strokes property returns a copy of the Strokes object.
// This copy must be implicitly (via using statement) or explicitly
// disposed of in order to avoid a memory leak.
using (Strokes currentStrokes = mInkOverlay.Ink.Strokes)
{
    // Declare an array of integers
    int[] theStrokeIDs = new int[currentStrokes.Count];

    // Copy stroke IDs into the array
    for (int k = 0; k < currentStrokes.Count; k++)
    {
        theStrokeIDs[k] = currentStrokes[k].Id;
    }
    // Create a new collection using the array of stroke IDs
    Strokes newStrokes = mInkOverlay.Ink.CreateStrokes(theStrokeIDs);
}

플랫폼

Windows Vista

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

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

Ink 클래스

Ink 멤버

CreateStrokes 오버로드

Microsoft.Ink 네임스페이스

Strokes

Ink.CreateStroke

Ink.DeleteStroke

Ink.DeleteStrokes