Condividi tramite


Stroke.GetEraseResult Metodo

Definizione

Restituisce i segmenti dell'oggetto Stroke corrente dopo che parte dell'oggetto Stroke viene cancellato.

Overload

GetEraseResult(IEnumerable<Point>)

Restituisce segmenti dell'oggetto Stroke corrente che si trovano all'esterno dei limiti specificati.

GetEraseResult(Rect)

Restituisce i segmenti dell'oggetto Stroke corrente che si trovano all'esterno del rettangolo specificato

GetEraseResult(IEnumerable<Point>, StylusShape)

Restituisce i segmenti dell'oggetto Stroke corrente dopo che viene sezionato dal percorso definito utilizzando l'oggetto StylusShape specificato.

GetEraseResult(IEnumerable<Point>)

Restituisce segmenti dell'oggetto Stroke corrente che si trovano all'esterno dei 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.

Restituisce

StrokeCollection

Oggetto StrokeCollection che contiene copie dei segmenti dell'oggetto Stroke corrente, che si trovano all'esterno dei 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 oggetto StrokeCollection contenente tratti che rappresentano i segmenti dell'oggetto Stroke esterno a lassoPoints. GetEraseResult non modifica l'originale Stroke.

Il GetClipResult metodo si connette il primo e ultimo punto nella lassoPoints creare lazo.

Si applica a

GetEraseResult(Rect)

Restituisce i segmenti dell'oggetto Stroke corrente che si trovano all'esterno del 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.

Restituisce

StrokeCollection

Oggetto StrokeCollection che contiene i segmenti dell'oggetto Stroke corrente che si trovano all'esterno dei limiti dell'oggetto Rect specificato.

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 oggetto StrokeCollection contenente tratti che rappresentano i segmenti dell'oggetto Stroke esterno a bounds. GetEraseResult non modifica l'originale Stroke.

Si applica a

GetEraseResult(IEnumerable<Point>, StylusShape)

Restituisce i segmenti dell'oggetto Stroke corrente dopo che viene sezionato dal percorso definito utilizzando l'oggetto StylusShape specificato.

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>

La matrice di tipo Point che specifica il tracciato che seziona l'oggetto Stroke.

eraserShape
StylusShape

Oggetto StylusShape che specifica la forma della gomma da cancellare.

Restituisce

StrokeCollection

Oggetto StrokeCollection che contiene copie dei segmenti dell'oggetto Stroke corrente dopo che viene sezionato 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 testare il tratto eraserPath lungo e restituisce un oggetto StrokeCollection che rappresenta segmenti dissezionati. GetEraseResult non modifica l'originale Stroke.

Si applica a