EllipseStylusShape クラス

定義

楕円のような形をしたスタイラスの先端を表します。

public ref class EllipseStylusShape sealed : System::Windows::Ink::StylusShape
public sealed class EllipseStylusShape : System.Windows.Ink.StylusShape
type EllipseStylusShape = class
    inherit StylusShape
Public NotInheritable Class EllipseStylusShape
Inherits StylusShape
継承
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, Double)

指定した幅、高さ、および角度を使用して、 EllipseStylusShape クラスの新しいインスタンスを初期化します。

EllipseStylusShape(Double, Double)

幅と高さを指定して、 EllipseStylusShape クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
Height

スタイラスの高さを取得します。

(継承元 StylusShape)
Rotation

スタイラスの角度を取得します。

(継承元 StylusShape)
Width

スタイラスの幅を取得します。

(継承元 StylusShape)

メソッド

名前 説明
Equals(Object)

指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象