RectangleStylusShape Klass

Definition

Representerar ett rektangulärt pennans tips.

public ref class RectangleStylusShape sealed : System::Windows::Ink::StylusShape
public sealed class RectangleStylusShape : System.Windows.Ink.StylusShape
type RectangleStylusShape = class
    inherit StylusShape
Public NotInheritable Class RectangleStylusShape
Inherits StylusShape
Arv
RectangleStylusShape

Exempel

I följande exempel visas hur du använder en RectangleStylusShape för att utföra träfftestning på en StrokeCollection. Det här exemplet förutsätter att det finns en InkPresenter som heter 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

Konstruktorer

Name Description
RectangleStylusShape(Double, Double, Double)

Initierar en ny instans av RectangleStylusShape klassen med angiven bredd, höjd och vinkel.

RectangleStylusShape(Double, Double)

Initierar en ny instans av RectangleStylusShape klassen med angiven bredd och höjd.

Egenskaper

Name Description
Height

Hämtar pennans höjd.

(Ärvd från StylusShape)
Rotation

Hämtar pennans vinkel.

(Ärvd från StylusShape)
Width

Hämtar pennans bredd.

(Ärvd från StylusShape)

Metoder

Name Description
Equals(Object)

Avgör om det angivna objektet är lika med det aktuella objektet.

(Ärvd från Object)
GetHashCode()

Fungerar som standard-hash-funktion.

(Ärvd från Object)
GetType()

Hämtar den aktuella instansen Type .

(Ärvd från Object)
MemberwiseClone()

Skapar en ytlig kopia av den aktuella Object.

(Ärvd från Object)
ToString()

Returnerar en sträng som representerar det aktuella objektet.

(Ärvd från Object)

Gäller för