Język

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 przyjęto założenie, ż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

Nazwa Opis
RectangleStylusShape(Double, Double, Double)

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

RectangleStylusShape(Double, Double)

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

Właściwości

Nazwa Opis
Height

Pobiera wysokość rysika.

(Odziedziczone po StylusShape)
Rotation

Pobiera kąt rysika.

(Odziedziczone po StylusShape)
Width

Pobiera szerokość rysika.

(Odziedziczone po StylusShape)

Metody

Nazwa Opis
Equals(Object)

Określa, czy określony obiekt jest równy bieżącemu obiektowi.

(Odziedziczone po Object)
GetHashCode()

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

(Odziedziczone po Object)
GetType()

Pobiera Type bieżącego wystąpienia.

(Odziedziczone po Object)
MemberwiseClone()

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

(Odziedziczone po Object)
ToString()

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

(Odziedziczone po Object)

Dotyczy