Lingua

RectangleStylusShape Classe

Definizione

Rappresenta una punta dello stilo rettangolare.

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
Ereditarietà
RectangleStylusShape

Esempio

Nell'esempio seguente viene illustrato come usare un RectangleStylusShape oggetto per eseguire hit testing su un oggetto StrokeCollection. In questo esempio si presuppone che sia presente un InkPresenter oggetto denominato 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

Costruttori

Nome Descrizione
RectangleStylusShape(Double, Double, Double)

Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza, l'altezza e l'angolo specificati.

RectangleStylusShape(Double, Double)

Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza e l'altezza specificate.

Proprietà

Nome Descrizione
Height

Ottiene l'altezza dello stilo.

(Ereditato da StylusShape)
Rotation

Ottiene l'angolo dello stilo.

(Ereditato da StylusShape)
Width

Ottiene la larghezza dello stilo.

(Ereditato da StylusShape)

Metodi

Nome Descrizione
Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetType()

Ottiene il Type dell'istanza corrente.

(Ereditato da Object)
MemberwiseClone()

Crea una copia superficiale del Objectcorrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a