Language

RectangleStylusShape コンストラクター

定義

RectangleStylusShape クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
RectangleStylusShape(Double, Double)

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

RectangleStylusShape(Double, Double, Double)

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

RectangleStylusShape(Double, Double)

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

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

パラメーター

width
Double

スタイラス図形の幅。

height
Double

スタイラス図形の高さ。

例

次の例では、 RectangleStylusShape を使用して、 StrokeCollectionでヒット テストを実行する方法を示します。 この例では、InkPresenterと呼ばれるpresenterがあることを前提としています。

private void HitTestWithEraser(Point[] points)
{
    RectangleStylusShape eraser = new RectangleStylusShape(3, 3, 0);

    StrokeCollection strokes = presenter.Strokes.HitTest(points, eraser);

    foreach (Stroke s in strokes)
    {
        s.DrawingAttributes.Color = Colors.Purple;
    }
}
Private Sub HitTestWithEraser(ByVal points() As Point)
    Dim eraser As RectangleStylusShape = New RectangleStylusShape(3, 3, 0)

    Dim strokes As StrokeCollection = presenter.Strokes.HitTest(points, eraser)

    Dim s As Stroke
    For Each s In strokes
        s.DrawingAttributes.Color = Colors.Purple
    Next
End Sub

適用対象

RectangleStylusShape(Double, Double, Double)

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

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

パラメーター

width
Double

スタイラス図形の幅。

height
Double

スタイラス図形の高さ。

rotation
Double

スタイラス図形の角度。

例

次の例では、 RectangleStylusShape を使用して、 StrokeCollectionでヒット テストを実行する方法を示します。 この例では、InkPresenterと呼ばれるpresenterがあることを前提としています。

private void HitTestWithEraser(Point[] points)
{
    RectangleStylusShape eraser = new RectangleStylusShape(3, 3, 0);

    StrokeCollection strokes = presenter.Strokes.HitTest(points, eraser);

    foreach (Stroke s in strokes)
    {
        s.DrawingAttributes.Color = Colors.Purple;
    }
}
Private Sub HitTestWithEraser(ByVal points() As Point)
    Dim eraser As RectangleStylusShape = New RectangleStylusShape(3, 3, 0)

    Dim strokes As StrokeCollection = presenter.Strokes.HitTest(points, eraser)

    Dim s As Stroke
    For Each s In strokes
        s.DrawingAttributes.Color = Colors.Purple
    Next
End Sub

適用対象