RectangleStylusShape Klasa

Definicja

Reprezentuje prostokątną końcówkę rysika.

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
Dziedziczenie
RectangleStylusShape

Przykłady

W poniższym przykładzie pokazano, jak używać metody RectangleStylusShape do przeprowadzania testów trafień na obiekcie StrokeCollection. W tym przykładzie założono, że istnieje InkPresenter nazwa .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

Konstruktory

RectangleStylusShape(Double, Double)

Inicjuje RectangleStylusShape nowe wystąpienie klasy o określonej szerokości i wysokości.

RectangleStylusShape(Double, Double, Double)

Inicjuje RectangleStylusShape nowe wystąpienie klasy o określonej szerokości, wysokości i kątze.

Właściwości

Height

Pobiera wysokość rysika.

(Odziedziczone po StylusShape)
Rotation

Pobiera kąt rysika.

(Odziedziczone po StylusShape)
Width

Pobiera szerokość rysika.

(Odziedziczone po StylusShape)

Metody

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera wartość bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Dotyczy