Stroke.GetEraseResult メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| GetEraseResult(IEnumerable<Point>) |
指定した境界外にある現在の Stroke のセグメントを返します。 |
| GetEraseResult(Rect) |
指定した四角形の外側にある現在の Stroke のセグメントを返します。 |
| GetEraseResult(IEnumerable<Point>, StylusShape) |
指定したStrokeを使用して、指定されたパスによって解剖された後、現在のStylusShapeのセグメントを返します。 |
GetEraseResult(IEnumerable<Point>)
指定した境界外にある現在の Stroke のセグメントを返します。
public:
System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ lassoPoints);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Collections.Generic.IEnumerable<System.Windows.Point> lassoPoints);
member this.GetEraseResult : seq<System.Windows.Point> -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (lassoPoints As IEnumerable(Of Point)) As StrokeCollection
パラメーター
- lassoPoints
- IEnumerable<Point>
消去する領域を指定する Point 型の配列。
返品
指定した境界外にある現在のStrokeCollectionのセグメントを含むStroke。
例
次の使用例は、指定した範囲内にあるインクを削除します。
Point[] myPoints = new Point[] {
new Point(100, 100),
new Point(200, 100),
new Point(200, 200),
new Point(100, 200)};
StrokeCollection eraseResults = aStroke.GetEraseResult(myPoints);
// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
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 eraseResults As StrokeCollection = aStroke.GetEraseResult(myPoints)
' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)
注釈
GetEraseResult メソッドは、StrokeCollectionの外部にあるStrokeのセグメントを表すストロークを含むlassoPointsを返します。
GetEraseResult では、元の Strokeは変更されません。
GetClipResultメソッドは、lassoPointsの最初と最後のポイントを接続してなげなわを作成します。
適用対象
GetEraseResult(Rect)
指定した四角形の外側にある現在の Stroke のセグメントを返します。
public:
System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Windows::Rect bounds);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Windows.Rect bounds);
member this.GetEraseResult : System.Windows.Rect -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (bounds As Rect) As StrokeCollection
パラメーター
返品
指定したStrokeCollectionの境界外にある現在のStrokeのセグメントを含むRect。
例
次の使用例は、指定した範囲内にあるインクを削除します。
Rect myRect = new Rect(100, 100, 100, 100);
StrokeCollection eraseResults = aStroke.GetEraseResult(myRect);
// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
Dim myRect As New Rect(100, 100, 100, 100)
Dim eraseResults As StrokeCollection = aStroke.GetEraseResult(myRect)
' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)
注釈
GetEraseResult メソッドは、StrokeCollectionの外部にあるStrokeのセグメントを表すストロークを含むboundsを返します。
GetEraseResult では、元の Strokeは変更されません。
適用対象
GetEraseResult(IEnumerable<Point>, StylusShape)
指定したStrokeを使用して、指定されたパスによって解剖された後、現在のStylusShapeのセグメントを返します。
public:
System::Windows::Ink::StrokeCollection ^ GetEraseResult(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ eraserPath, System::Windows::Ink::StylusShape ^ eraserShape);
public System.Windows.Ink.StrokeCollection GetEraseResult(System.Collections.Generic.IEnumerable<System.Windows.Point> eraserPath, System.Windows.Ink.StylusShape eraserShape);
member this.GetEraseResult : seq<System.Windows.Point> * System.Windows.Ink.StylusShape -> System.Windows.Ink.StrokeCollection
Public Function GetEraseResult (eraserPath As IEnumerable(Of Point), eraserShape As StylusShape) As StrokeCollection
パラメーター
- eraserPath
- IEnumerable<Point>
- eraserShape
- StylusShape
消しゴムの形状を指定する StylusShape 。
返品
現在のStrokeCollectionのセグメントのコピーが、指定したパスによって解剖された後に含まれるStroke。
例
次の例では、指定したパスと交差するインクを消去する方法を示します。
Point[] myPoints = new Point[] {
new Point(100, 100),
new Point(200, 100),
new Point(200, 200),
new Point(100, 200)};
EllipseStylusShape myStylus = new EllipseStylusShape(5.0, 5.0, 0.0);
StrokeCollection eraseResults = aStroke.GetEraseResult(myPoints, myStylus);
// inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke);
inkCanvas1.Strokes.Add(eraseResults);
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 myStylus As New EllipseStylusShape(5.0, 5.0, 0.0)
Dim eraseResults As StrokeCollection = aStroke.GetEraseResult(myPoints, myStylus)
' inkCanvas1 is the InkCanvas on which we update the strokes
inkCanvas1.Strokes.Remove(aStroke)
inkCanvas1.Strokes.Add(eraseResults)
注釈
GetEraseResultメソッドは、eraserShapeを使用して、eraserPathに沿ってストロークをヒット テストし、分割されたセグメントを表すStrokeCollectionを返します。
GetEraseResult では、元の Strokeは変更されません。