Lingua

Stroke.GetEraseResult Metodo

Definizione

Restituisce i segmenti dell'oggetto corrente Stroke dopo la Stroke cancellazione di parte di .

Overload

Nome Descrizione
GetEraseResult(IEnumerable<Point>)

Restituisce segmenti dell'oggetto corrente Stroke esterni ai limiti specificati.

GetEraseResult(Rect)

Restituisce segmenti dell'oggetto corrente Stroke esterni al rettangolo specificato.

GetEraseResult(IEnumerable<Point>, StylusShape)

Restituisce i segmenti dell'oggetto corrente Stroke dopo che è stato analizzato dal percorso designato utilizzando l'oggetto specificato StylusShape.

GetEraseResult(IEnumerable<Point>)

Restituisce segmenti dell'oggetto corrente Stroke esterni ai limiti specificati.

public:
 System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ lassoPoints);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Collections.Generic.IEnumerable<System.Windows.Point> lassoPoints);
member this.GetEraseResult : seq<System.Windows.Point> -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (lassoPoints As IEnumerable(Of Point)) As StrokeCollection

Parametri

lassoPoints
IEnumerable<Point>

Matrice di tipo Point che specifica l'area da cancellare.

Valori restituiti

Oggetto StrokeCollection che contiene i segmenti dell'oggetto corrente Stroke esterni ai limiti specificati.

Esempio

Nell'esempio seguente viene rimosso l'input penna all'interno dei limiti specificati.

Point[] myPoints = new Point[] {
    new Point(100, 100),
    new Point(200, 100),
    new Point(200, 200),
    new Point(100, 200)};

StrokeCollection eraseResults = aStroke.GetEraseResult(myPoints);

// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
Dim myPoints() As System.Windows.Point = _
              {New System.Windows.Point(100, 100), _
               New System.Windows.Point(200, 100), _
               New System.Windows.Point(200, 200), _
               New System.Windows.Point(100, 200)}

Dim eraseResults As StrokeCollection = aStroke.GetEraseResult(myPoints)

' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)

Commenti

Il GetEraseResult metodo restituisce un StrokeCollection oggetto che contiene tratti che rappresentano i segmenti di che si trovano all'esterno Stroke di lassoPoints. GetEraseResult non modifica l'oggetto originale Stroke.

Il GetClipResult metodo connette il primo e l'ultimo punto in lassoPoints per creare il lasso.

Si applica a

GetEraseResult(Rect)

Restituisce segmenti dell'oggetto corrente Stroke esterni al rettangolo specificato.

public:
 System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Windows::Rect bounds);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Windows.Rect bounds);
member this.GetEraseResult : System.Windows.Rect -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (bounds As Rect) As StrokeCollection

Parametri

bounds
Rect

Oggetto Rect che specifica l'area da cancellare.

Valori restituiti

Oggetto StrokeCollection che contiene i segmenti dell'oggetto corrente Stroke esterni ai limiti dell'oggetto specificato Rect.

Esempio

Nell'esempio seguente viene rimosso l'input penna all'interno dei limiti specificati.

Rect myRect = new Rect(100, 100, 100, 100);

StrokeCollection eraseResults = aStroke.GetEraseResult(myRect);

// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
Dim myRect As New Rect(100, 100, 100, 100)

Dim eraseResults As StrokeCollection = aStroke.GetEraseResult(myRect)

' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)

Commenti

Il GetEraseResult metodo restituisce un StrokeCollection oggetto che contiene tratti che rappresentano i segmenti di che si trovano all'esterno Stroke di bounds. GetEraseResult non modifica l'oggetto originale Stroke.

Si applica a

GetEraseResult(IEnumerable<Point>, StylusShape)

Restituisce i segmenti dell'oggetto corrente Stroke dopo che è stato analizzato dal percorso designato utilizzando l'oggetto specificato StylusShape.

public:
 System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ eraserPath, System::Windows::Ink::StylusShape ^ eraserShape);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Collections.Generic.IEnumerable<System.Windows.Point> eraserPath, System.Windows.Ink.StylusShape eraserShape);
member this.GetEraseResult : seq<System.Windows.Point> * System.Windows.Ink.StylusShape -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (eraserPath As IEnumerable(Of Point), eraserShape As StylusShape) As StrokeCollection

Parametri

eraserPath
IEnumerable<Point>

Matrice di tipo Point che specifica il percorso che analizza .Stroke

eraserShape
StylusShape

Oggetto StylusShape che specifica la forma della gomma.

Valori restituiti

Oggetto StrokeCollection che contiene copie dei segmenti dell'oggetto corrente Stroke dopo che è stato dissezionato dal percorso specificato.

Esempio

Nell'esempio seguente viene illustrato come cancellare l'input penna che interseca un percorso specificato.

Point[] myPoints = new Point[] {
    new Point(100, 100),
    new	Point(200, 100),
    new	Point(200, 200),
    new	Point(100, 200)};

EllipseStylusShape myStylus = new EllipseStylusShape(5.0, 5.0, 0.0);

StrokeCollection eraseResults = aStroke.GetEraseResult(myPoints, myStylus);

// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
Dim myPoints() As System.Windows.Point = _
                      {New System.Windows.Point(100, 100), _
                       New System.Windows.Point(200, 100), _
                       New System.Windows.Point(200, 200), _
                       New System.Windows.Point(100, 200)}

Dim myStylus As New EllipseStylusShape(5.0, 5.0, 0.0)

Dim eraseResults As StrokeCollection = aStroke.GetEraseResult(myPoints, myStylus)

' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)

Commenti

Il GetEraseResult metodo usa eraserShape per eseguire il hit test del tratto eraserPath e restituisce un StrokeCollection oggetto che rappresenta segmenti dissezionati. GetEraseResult non modifica l'oggetto originale Stroke.

Si applica a