共用方式為


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 回 ,其中包含代表 內 lassoPoints 之區段的 Stroke 筆劃。 GetClipResult 不會變更原始 Stroke 的 。

方法 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

StrokeCollection,包含在 bounds 界限內目前 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 回 ,其中包含代表 內 bounds 之區段的 Stroke 筆劃。 GetClipResult 不會變更原始 Stroke 的 。

適用於