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

建構函式

RectangleStylusShape(Double, Double)

使用指定的寬度和高度,初始化 RectangleStylusShape 類別的新執行個體。

RectangleStylusShape(Double, Double, Double)

使用指定的寬度、高度和角度,初始化 RectangleStylusShape 類別的新執行個體。

屬性

Height

取得手寫筆的高度。

(繼承來源 StylusShape)
Rotation

取得手寫筆的角度。

(繼承來源 StylusShape)
Width

取得手寫筆的寬度。

(繼承來源 StylusShape)

方法

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於