Share via


EllipseStylusShape 생성자

정의

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

오버로드

EllipseStylusShape(Double, Double)

지정된 너비 및 높이를 사용하여 EllipseStylusShape 클래스의 새 인스턴스를 초기화합니다.

EllipseStylusShape(Double, Double, Double)

지정된 너비, 높이 및 각도를 사용하여 EllipseStylusShape 클래스의 새 인스턴스를 초기화합니다.

설명

다음 예제에서는 만드는 방법을 보여 줍니다.는 EllipseStylusShape 에 전달 합니다 GetIncrementalStrokeHitTester 부분을 지우는 방법을 Stroke입니다. 이 예제에서는 있다고 가정를 IncrementalStrokeHitTester 호출 eraseTester 하 고 해당 StrokeHit 이벤트가이 예제에서 정의 된 이벤트 처리기에 연결 되었습니다. 사용자가 잉크를 지울 수 있도록 하는 컨트롤을 만들려면 참조 방법: 사용자 지정 컨트롤에서 잉크 지우기합니다.

// Prepare to collect stylus packets. Get the 
// IncrementalHitTester from the InkPresenter's 
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
    base.OnStylusDown(e);

    EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
    eraseTester = 
        presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
    eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
    eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the 
' IncrementalHitTester from the InkPresenter's 
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)

    MyBase.OnStylusDown(e)

    Dim eraserTip As New EllipseStylusShape(3, 3, 0)
    eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
    AddHandler eraseTester.StrokeHit, _
        AddressOf eraseTester_StrokeHit
    eraseTester.AddPoints(e.GetStylusPoints(Me))

End Sub

EllipseStylusShape(Double, Double)

지정된 너비 및 높이를 사용하여 EllipseStylusShape 클래스의 새 인스턴스를 초기화합니다.

public:
 EllipseStylusShape(double width, double height);
public EllipseStylusShape (double width, double height);
new System.Windows.Ink.EllipseStylusShape : double * double -> System.Windows.Ink.EllipseStylusShape
Public Sub New (width As Double, height As Double)

매개 변수

width
Double

스타일러스 도형의 너비입니다.

height
Double

스타일러스 도형의 높이입니다.

예제

다음 예제에서는 만드는 방법을 보여 줍니다.는 EllipseStylusShape 에 전달 합니다 GetIncrementalStrokeHitTester 부분을 지우는 방법을 Stroke입니다. 이 예제에서는 있다고 가정를 IncrementalStrokeHitTester 호출 eraseTester 하 고 해당 StrokeHit 이벤트가이 예제에서 정의 된 이벤트 처리기에 연결 되었습니다. 사용자가 잉크를 지울 수 있도록 하는 컨트롤을 만들려면 참조 방법: 사용자 지정 컨트롤에서 잉크 지우기합니다.

// Prepare to collect stylus packets. Get the 
// IncrementalHitTester from the InkPresenter's 
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
    base.OnStylusDown(e);

    EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
    eraseTester = 
        presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
    eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
    eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the 
' IncrementalHitTester from the InkPresenter's 
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)

    MyBase.OnStylusDown(e)

    Dim eraserTip As New EllipseStylusShape(3, 3, 0)
    eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
    AddHandler eraseTester.StrokeHit, _
        AddressOf eraseTester_StrokeHit
    eraseTester.AddPoints(e.GetStylusPoints(Me))

End Sub

적용 대상

EllipseStylusShape(Double, Double, Double)

지정된 너비, 높이 및 각도를 사용하여 EllipseStylusShape 클래스의 새 인스턴스를 초기화합니다.

public:
 EllipseStylusShape(double width, double height, double rotation);
public EllipseStylusShape (double width, double height, double rotation);
new System.Windows.Ink.EllipseStylusShape : double * double * double -> System.Windows.Ink.EllipseStylusShape
Public Sub New (width As Double, height As Double, rotation As Double)

매개 변수

width
Double

스타일러스 도형의 너비입니다.

height
Double

스타일러스 도형의 높이입니다.

rotation
Double

스타일러스 도형의 각도입니다.

예제

다음 예제에서는 만드는 방법을 보여 줍니다.는 EllipseStylusShape 에 전달 합니다 GetIncrementalStrokeHitTester 부분을 지우는 방법을 Stroke입니다. 이 예제에서는 있다고 가정를 IncrementalStrokeHitTester 호출 eraseTester 하 고 해당 StrokeHit 이벤트가이 예제에서 정의 된 이벤트 처리기에 연결 되었습니다. 사용자가 잉크를 지울 수 있도록 하는 컨트롤을 만들려면 참조 방법: 사용자 지정 컨트롤에서 잉크 지우기합니다.

// Prepare to collect stylus packets. Get the 
// IncrementalHitTester from the InkPresenter's 
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
    base.OnStylusDown(e);

    EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
    eraseTester = 
        presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
    eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
    eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the 
' IncrementalHitTester from the InkPresenter's 
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)

    MyBase.OnStylusDown(e)

    Dim eraserTip As New EllipseStylusShape(3, 3, 0)
    eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
    AddHandler eraseTester.StrokeHit, _
        AddressOf eraseTester_StrokeHit
    eraseTester.AddPoints(e.GetStylusPoints(Me))

End Sub

적용 대상