Stroke.GetClipResult メソッド

定義

指定した領域内にある現在の Stroke のセグメントを返します。

オーバーロード

GetClipResult(IEnumerable<Point>)

指定した境界内にある現在の Stroke のセグメントを返します。

GetClipResult(Rect)

指定した四角形内にある現在の Stroke のセグメントを返します。

GetClipResult(IEnumerable<Point>)

指定した境界内にある現在の Stroke のセグメントを返します。

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

パラメーター

lassoPoints
IEnumerable<Point>

クリップする場所を定義する線を示す点。

戻り値

StrokeCollection

指定した境界内にある現在の StrokeCollection のセグメントのコピーを格納する Stroke

次の例では、指定した境界の外にあるインクを削除します。

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

StrokeCollection clipResults = aStroke.GetClipResult(myPoints);

// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(clipResults);
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 clipResults As StrokeCollection = aStroke.GetClipResult(myPoints)

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

注釈

メソッドはGetClipResultStrokeCollection内にあるセグメントを表すストロークを含む a lassoPointsStroke返します。 GetClipResultStrokeのファイルは変更されません。

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

適用対象

GetClipResult(Rect)

指定した四角形内にある現在の Stroke のセグメントを返します。

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

パラメーター

bounds
Rect

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

戻り値

StrokeCollection

bounds の境界内にある現在の StrokeCollection のセグメントのコピーを格納する Stroke

次の例では、指定した境界の外にあるインクを削除します。

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

StrokeCollection clipResults = aStroke.GetClipResult(myRect);

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

Dim clipResults As StrokeCollection = aStroke.GetClipResult(myRect)

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

注釈

メソッドはGetClipResultStrokeCollection内にあるセグメントを表すストロークを含む a boundsStroke返します。 GetClipResultStrokeのファイルは変更されません。

適用対象