Stroke.GetEraseResult Metoda

Definicja

Zwraca segmenty bieżącego Stroke elementu po wymazaniu części Stroke .

Przeciążenia

GetEraseResult(IEnumerable<Point>)

Zwraca segmenty bieżącego Stroke elementu, które znajdują się poza określonymi granicami.

GetEraseResult(Rect)

Zwraca segmenty bieżącego Stroke , które znajdują się poza określonym prostokątem.

GetEraseResult(IEnumerable<Point>, StylusShape)

Zwraca segmenty bieżącego Stroke po jego rozcięcie przez wyznaczoną ścieżkę przy użyciu określonej StylusShapeścieżki .

GetEraseResult(IEnumerable<Point>)

Zwraca segmenty bieżącego Stroke elementu, które znajdują się poza określonymi granicami.

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

Parametry

lassoPoints
IEnumerable<Point>

Tablica typu Point , która określa obszar do wymazywania.

Zwraca

Element StrokeCollection zawierający segmenty bieżącego Stroke , które znajdują się poza określonymi granicami.

Przykłady

Poniższy przykład usuwa atrament znajdujący się w określonych granicach.

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)

Uwagi

Metoda GetEraseResult zwraca wartość zawierającą StrokeCollection pociągnięcia reprezentujące segmenty Stroke , które znajdują się poza wartością lassoPoints. GetEraseResult program nie zmienia oryginalnego Strokepliku .

Metoda GetClipResult łączy pierwsze i ostatnie punkty, lassoPoints aby utworzyć lasso.

Dotyczy

GetEraseResult(Rect)

Zwraca segmenty bieżącego Stroke , które znajdują się poza określonym prostokątem.

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

Parametry

bounds
Rect

Element Rect określający obszar do wymazywania.

Zwraca

Element StrokeCollection zawierający segmenty bieżącego Stroke elementu, które znajdują się poza granicami określonego Rectelementu .

Przykłady

Poniższy przykład usuwa atrament znajdujący się w określonych granicach.

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)

Uwagi

Metoda GetEraseResult zwraca wartość zawierającą StrokeCollection pociągnięcia reprezentujące segmenty Stroke , które znajdują się poza wartością bounds. GetEraseResult program nie zmienia oryginalnego Strokepliku .

Dotyczy

GetEraseResult(IEnumerable<Point>, StylusShape)

Zwraca segmenty bieżącego Stroke po jego rozcięcie przez wyznaczoną ścieżkę przy użyciu określonej StylusShapeścieżki .

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

Parametry

eraserPath
IEnumerable<Point>

Tablica typu Point określająca ścieżkę, która odcięła Strokeelement .

eraserShape
StylusShape

Element StylusShape określający kształt gumki.

Zwraca

Element StrokeCollection zawierający kopie segmentów bieżącej Stroke wartości po jej rozcięcie przez określoną ścieżkę.

Przykłady

W poniższym przykładzie pokazano, jak wymazać atrament, który przecina określoną ścieżkę.

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)

Uwagi

Metoda GetEraseResult używa eraserShape do trafienia testowego pociągnięcia wzdłuż eraserPath i zwraca wartość reprezentującą rozciągnięcia StrokeCollection segmentów. GetEraseResult program nie zmienia oryginalnego Strokepliku .

Dotyczy