Share via


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

スタイラスの図形の高さ。

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

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

スタイラスの図形の角度。

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

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

適用対象