Stroke.GetClipResult メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した領域内にある現在の 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のセグメントのコピーを格納する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)
注釈
GetClipResult メソッドは、StrokeCollection内のStrokeのセグメントを表すストロークを含むlassoPointsを返します。
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
パラメーター
返品
StrokeCollectionの範囲内にある現在のStrokeのセグメントのコピーを含むbounds。
例
次の例では、指定した境界外にあるインクを削除します。
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)
注釈
GetClipResult メソッドは、StrokeCollection内のStrokeのセグメントを表すストロークを含むboundsを返します。
GetClipResult では、元の Strokeは変更されません。