Sprache

RectangleStylusShape Konstruktoren

Definition

Initialisiert eine neue Instanz der RectangleStylusShape-Klasse.

Überlädt

Name Beschreibung
RectangleStylusShape(Double, Double)

Initialisiert eine neue Instanz der RectangleStylusShape Klasse mit der angegebenen Breite und Höhe.

RectangleStylusShape(Double, Double, Double)

Initialisiert eine neue Instanz der RectangleStylusShape Klasse mit der angegebenen Breite, Höhe und Winkel.

RectangleStylusShape(Double, Double)

Initialisiert eine neue Instanz der RectangleStylusShape Klasse mit der angegebenen Breite und Höhe.

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)

Parameter

width
Double

Die Breite der Eingabestiftform.

height
Double

Die Höhe der Eingabestiftform.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Sie einen RectangleStylusShape Treffertests für ein .StrokeCollection In diesem Beispiel wird davon ausgegangen, dass ein aufgerufener InkPresenter Vorgang vorhanden presenterist.

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

Gilt für:

RectangleStylusShape(Double, Double, Double)

Initialisiert eine neue Instanz der RectangleStylusShape Klasse mit der angegebenen Breite, Höhe und Winkel.

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)

Parameter

width
Double

Die Breite der Eingabestiftform.

height
Double

Die Höhe der Eingabestiftform.

rotation
Double

Der Winkel des Eingabestifts.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Sie einen RectangleStylusShape Treffertests für ein .StrokeCollection In diesem Beispiel wird davon ausgegangen, dass ein aufgerufener InkPresenter Vorgang vorhanden presenterist.

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

Gilt für: