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

適用対象