다음을 통해 공유


DynamicRenderer 생성자 (Control)

업데이트: 2007년 11월

DynamicRenderer 클래스의 새 인스턴스를 초기화합니다.

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

구문

‘선언
Public Sub New ( _
    control As Control _
)
‘사용 방법
Dim control As Control

Dim instance As New DynamicRenderer(control)
public DynamicRenderer(
    Control control
)
public:
DynamicRenderer(
    Control^ control
)
public DynamicRenderer(
    Control control
)
public function DynamicRenderer(
    control : Control
)

매개 변수

설명

일반적으로는 DynamicRendererRealTimeStylus 개체를 동일한 Control 또는 창 핸들을 사용하여 초기화하지만 서로 다른 개체를 사용하여 초기화할 수도 있습니다. 예를 들어 스트로크 패킷이 생성되는 창이 아닌 다른 창에 잉크를 렌더링할 수 있습니다.

예제

이 C# 예제에서는 IStylusAsyncPlugin 인터페이스를 구현하는 폼의 Load 이벤트에 대한 이벤트 처리기를 보여 줍니다. DynamicRenderer 개체의 새 인스턴스인 theDynamicRenderer 및 RealTimeStylus 개체인 theRealTimeStylus가 초기화되고 폼에 연결된 후 활성화됩니다.

using Microsoft.StylusInput;
// ...
private RealTimeStylus theRealTimeStylus;
private DynamicRenderer theDynamicRenderer;
// ...
private void InkCollection_Load(object sender, System.EventArgs e)
{
    theDynamicRenderer = new DynamicRenderer(this);
    theRealTimeStylus = new RealTimeStylus(this, true);

    // Add the dynamic renderer to the synchronous plugin notification chain.
    // Synchronous notifications occur on the pen thread.
    theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer);

    // Add the form to the asynchronous plugin notification chain.  This plugin
    // will be used to collect stylus data into an ink object.  Asynchronous
    // notifications occur on the UI thread.
    theRealTimeStylus.AsyncPluginCollection.Add(this);

    // Enable the real time stylus and the dynamic renderer
    theRealTimeStylus.Enabled = true;
    theDynamicRenderer.Enabled = true;  
}

이 Microsoft Visual Basic .NET 예제에서는 IStylusAsyncPlugin 인터페이스를 구현하는 폼의 Load 이벤트에 대한 이벤트 처리기를 보여 줍니다. DynamicRenderer 개체의 새 인스턴스인 theDynamicRenderer 및 RealTimeStylus 개체인 theRealTimeStylus가 초기화되고 폼에 연결된 후 활성화됩니다.

Imports Microsoft.StylusInput
' ...
Private theRealTimeStylus As RealTimeStylus
Private theDynamicRenderer As DynamicRenderer

' ...
Private Sub InkCollector_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
    theDynamicRenderer = New DynamicRenderer(Me)
    theRealTimeStylus = New RealTimeStylus(Me, True)

    ' Add the dynamic renderer to the synchronous plugin notification chain.
    ' Synchronous notifications occur on the pen thread.
    theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer)

    ' Add the form to the asynchronous plugin notification chain.  This plugin
    ' will be used to collect stylus data into an ink object.  Asynchronous
    ' notifications occur on the UI thread.
    theRealTimeStylus.AsyncPluginCollection.Add(Me)

    ' Enable the real time stylus and the dynamic renderer
    theRealTimeStylus.Enabled = True
    theDynamicRenderer.Enabled = True
End Sub

플랫폼

Windows Vista, Windows XP SP2, Windows Server 2003

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

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

DynamicRenderer 클래스

DynamicRenderer 멤버

DynamicRenderer 오버로드

Microsoft.StylusInput 네임스페이스

IStylusAsyncPlugin