StrokeCollection.Clip メソッド

定義

指定された境界の外側にある StrokeCollection のストロークをすべて削除します。

オーバーロード

Clip(IEnumerable<Point>)

指定された StrokeCollection 配列の境界の外側にある Point のストロークをすべて削除します。

Clip(Rect)

指定した四角形にクリップされているすべてのストロークを、指定した四角形を超えない新しいストロークに置き換えます。

Clip(IEnumerable<Point>)

指定された StrokeCollection 配列の境界の外側にある Point のストロークをすべて削除します。

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

パラメーター

lassoPoints
IEnumerable<Point>

クリップ対象の領域を指定する Point 型の配列。

次の例では、 でストロークをクリップする方法を StrokeCollection示します。 この例では、 という名前presenterの があることをInkPresenter前提としています。

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

    If lasso Is Nothing Then
        Return
    End If

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

End Sub

注釈

メソッドは Clip 、 の最初と最後の lassoPoints ポイントを接続してなげなわを作成します。

メソッドは ClipStrokesChanged クリップごとに Stroke イベントを発生させます。

適用対象

Clip(Rect)

指定した四角形にクリップされているすべてのストロークを、指定した四角形を超えない新しいストロークに置き換えます。

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

パラメーター

bounds
Rect

クリップ対象の領域を指定する Rect

次の例では、 の境界外にあるインクを消去する方法を Rect示します。 この例では、 という名前presenterの があることをInkPresenter前提としています。

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

注釈

指定した四角形の外側にあるすべてのストロークが削除されます。

適用対象