EllipseStylusShape Classe

Definizione

Rappresenta la punta dello stilo che ha la forma di un'ellisse.

public ref class EllipseStylusShape sealed : System::Windows::Ink::StylusShape
public sealed class EllipseStylusShape : System.Windows.Ink.StylusShape
type EllipseStylusShape = class
    inherit StylusShape
Public NotInheritable Class EllipseStylusShape
Inherits StylusShape
Ereditarietà
EllipseStylusShape

Esempio

Nell'esempio seguente viene illustrato come creare un oggetto EllipseStylusShape e passarlo al GetIncrementalStrokeHitTester metodo per cancellare una parte di un oggetto Stroke. In questo esempio si presuppone che sia presente un IncrementalStrokeHitTester oggetto denominato eraseTester e che il relativo StrokeHit evento sia stato connesso al gestore eventi definito in questo esempio. Per creare un controllo che consente a un utente di cancellare l'input penna, vedere Procedura: Cancellare l'input penna in un controllo personalizzato.

// Prepare to collect stylus packets. Get the 
// IncrementalHitTester from the InkPresenter's 
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
    base.OnStylusDown(e);

    EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
    eraseTester = 
        presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
    eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
    eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the 
' IncrementalHitTester from the InkPresenter's 
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)

    MyBase.OnStylusDown(e)

    Dim eraserTip As New EllipseStylusShape(3, 3, 0)
    eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
    AddHandler eraseTester.StrokeHit, _
        AddressOf eraseTester_StrokeHit
    eraseTester.AddPoints(e.GetStylusPoints(Me))

End Sub

Costruttori

EllipseStylusShape(Double, Double)

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

EllipseStylusShape(Double, Double, Double)

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

Proprietà

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

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 l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a