StrokeCollection.Erase 메서드

정의

지정한 영역의 범위 내에 있는 잉크를 제거합니다.

오버로드

Erase(IEnumerable<Point>)

지정한 영역의 범위 내에 있는 잉크를 제거합니다.

Erase(Rect)

지정된 직사각형으로 클리핑된 모든 스크로크를 지정된 직사각형의 경계 안에 들어오지 않는 새 스트로크로 바꿉니다.

Erase(IEnumerable<Point>, StylusShape)

지정한 경로를 따라 지정한 StylusShape에 의해 만들어진 영역으로 클리핑된 모든 스트로크를 해당 영역으로 클리핑되지 않은 새 스트로크로 바꿉니다.

Erase(IEnumerable<Point>)

지정한 영역의 범위 내에 있는 잉크를 제거합니다.

public:
 void Erase(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ lassoPoints);
public void Erase (System.Collections.Generic.IEnumerable<System.Windows.Point> lassoPoints);
member this.Erase : seq<System.Windows.Point> -> unit
Public Sub Erase (lassoPoints As IEnumerable(Of Point))

매개 변수

lassoPoints
IEnumerable<Point>

지울 영역을 지정하는 Point 형식의 배열입니다.

예제

다음 예제에서는의 스트로크를 지우는 방법은 StrokeCollection합니다. 이 예제에서는 있다고 가정를 InkPresenter 호출 presenter합니다.

// Erase the selected strokes.
public void EraseStrokes(Stroke lasso)
{
    Point[] strokePoints = (Point[])lasso.StylusPoints;
    presenter.Strokes.Erase(strokePoints);
}
' Erase the selected strokes.
Public Overloads Sub EraseStrokes(ByVal lasso As Stroke)

    If lasso Is Nothing Then
        Return
    End If

    Dim strokePoints() As Point = CType(lasso.StylusPoints, Point())

    presenter.Strokes.Erase(strokePoints)

End Sub

설명

합니다 Erase 메서드는 연결의 첫 번째 지점과 마지막 lassoPoints 올가미를 만들려고 합니다.

StrokeCollection 한 후 새 스트로크를 포함할 수 있습니다는 Erase 메서드가 호출 됩니다. 예를 들어, 지정된 된 영역의 중간 이면을 Stroke, erase 메서드를 제거 하는 Stroke 두 새 스트로크를 만듭니다.

합니다 Erase 메서드를 발생 시킵니다 합니다 StrokesChanged 각각에 대 한 이벤트 Stroke 지우는 합니다.

적용 대상

Erase(Rect)

지정된 직사각형으로 클리핑된 모든 스크로크를 지정된 직사각형의 경계 안에 들어오지 않는 새 스트로크로 바꿉니다.

public:
 void Erase(System::Windows::Rect bounds);
public void Erase (System.Windows.Rect bounds);
member this.Erase : System.Windows.Rect -> unit
Public Sub Erase (bounds As Rect)

매개 변수

bounds
Rect

지울 영역을 지정하는 Rect입니다.

예제

다음 예제에서는 내에서 잉크 지우기 하는 방법에 설명 합니다 Rect합니다. 이 예제에서는 있다고 가정를 InkPresenter 호출 presenter합니다.

Rect rect = new Rect(100, 100, 200, 200);
presenter.Strokes.Erase(rect);
Dim rect As Rect = New Rect(100, 100, 200, 200)
presenter.Strokes.Erase(rect)

설명

StrokeCollection 한 후 새 스트로크를 포함할 수 있습니다는 Erase 메서드가 호출 됩니다. 예를 들어, 지정된 된 영역의 중간 이면을 Stroke, erase 메서드를 제거 하는 Stroke 두 새 스트로크를 만듭니다. 지정된 된 사각형 내에 완전히 포함 된 모든 스트로크를 제거 됩니다.

합니다 Erase 메서드를 발생 시킵니다 합니다 StrokesChanged 각각에 대 한 이벤트 Stroke 지우는 합니다.

적용 대상

Erase(IEnumerable<Point>, StylusShape)

지정한 경로를 따라 지정한 StylusShape에 의해 만들어진 영역으로 클리핑된 모든 스트로크를 해당 영역으로 클리핑되지 않은 새 스트로크로 바꿉니다.

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

매개 변수

eraserPath
IEnumerable<Point>

지울 경로를 지정하는 Point 형식의 배열입니다.

eraserShape
StylusShape

지우개의 모양을 지정하는 StylusShape입니다.

예제

다음 예제에서는 특정 경로 따라 잉크를 지우는 방법을 보여 줍니다. 이 예제에서는 있다고 가정를 InkPresenter 호출 presenter합니다.

// Erase the ink that intersects the lasso.
public void ErasePath(Stroke lasso)
{
    EllipseStylusShape eraserTip = new EllipseStylusShape(5, 5);
    Point[] strokePoints = (Point[])lasso.StylusPoints;

    presenter.Strokes.Erase(strokePoints, eraserTip);
}
' Erase the ink that intersects the lasso.
Public Overloads Sub ErasePath(ByVal lasso As Stroke)

    If lasso Is Nothing Then
        Return
    End If

    Dim eraserTip As New EllipseStylusShape(5, 5, 0)
    Dim strokePoints() As Point = CType(lasso.StylusPoints, Point())

    presenter.Strokes.Erase(strokePoints, eraserTip)

End Sub

설명

StrokeCollection 한 후 새 스트로크를 포함할 수 있습니다는 Erase 메서드가 호출 됩니다. 예를 들어 경우 path 의 가운데와 교차를 Stroke, erase 메서드를 제거 하는 Stroke 두 새 스트로크를 만듭니다.

합니다 Erase 메서드를 발생 시킵니다 합니다 StrokesChanged 각각에 대 한 이벤트 Stroke 지우는 합니다.

적용 대상