語言

RectangleStylusShape 類別

定義

代表一個長方形的觸控筆尖端。

public ref class RectangleStylusShape sealed : System::Windows::Ink::StylusShape
public sealed class RectangleStylusShape : System.Windows.Ink.StylusShape
type RectangleStylusShape = class
    inherit StylusShape
Public NotInheritable Class RectangleStylusShape
Inherits StylusShape
繼承
RectangleStylusShape

範例

以下範例示範如何使用 對 RectangleStylusShape 進行命中測試 StrokeCollection。 此範例假設存在一個 InkPresenter 被呼叫 presenter的 。

private void HitTestWithEraser(Point[] points)
{
    RectangleStylusShape eraser = new RectangleStylusShape(3, 3, 0);

    StrokeCollection strokes = presenter.Strokes.HitTest(points, eraser);

    foreach (Stroke s in strokes)
    {
        s.DrawingAttributes.Color = Colors.Purple;
    }
}
Private Sub HitTestWithEraser(ByVal points() As Point)
    Dim eraser As RectangleStylusShape = New RectangleStylusShape(3, 3, 0)

    Dim strokes As StrokeCollection = presenter.Strokes.HitTest(points, eraser)

    Dim s As Stroke
    For Each s In strokes
        s.DrawingAttributes.Color = Colors.Purple
    Next
End Sub

建構函式

名稱 Description
RectangleStylusShape(Double, Double, Double)

初始化一個新的類別實例 RectangleStylusShape ,包含指定的寬度、高度與角度。

RectangleStylusShape(Double, Double)

初始化一個以指定寬度與高度的新類別實例 RectangleStylusShape 。

屬性

名稱 Description
Height

能達到觸控筆的高度。

(繼承來源 StylusShape)
Rotation

能看到觸控筆的角度。

(繼承來源 StylusShape)
Width

可以拿到觸控筆的寬度。

(繼承來源 StylusShape)

方法

名稱 Description
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於