Aracılığıyla paylaş


RectangleStylusShape Oluşturucular

Tanım

RectangleStylusShape sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

RectangleStylusShape(Double, Double)

Belirtilen genişlik ve yükseklik ile sınıfının yeni bir örneğini RectangleStylusShape başlatır.

RectangleStylusShape(Double, Double, Double)

Belirtilen genişlik, yükseklik ve açı ile sınıfının yeni bir örneğini RectangleStylusShape başlatır.

RectangleStylusShape(Double, Double)

Belirtilen genişlik ve yükseklik ile sınıfının yeni bir örneğini RectangleStylusShape başlatır.

public:
 RectangleStylusShape(double width, double height);
public RectangleStylusShape (double width, double height);
new System.Windows.Ink.RectangleStylusShape : double * double -> System.Windows.Ink.RectangleStylusShape
Public Sub New (width As Double, height As Double)

Parametreler

width
Double

Ekran kalemi şeklinin genişliği.

height
Double

Ekran kalemi şeklinin yüksekliği.

Örnekler

Aşağıdaki örnekte, üzerinde RectangleStylusShape isabet testi gerçekleştirmek için 'nin nasıl kullanılacağı gösterilmektedir StrokeCollection. Bu örnekte adlı presenterbir InkPresenter olduğu varsayılır.

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

Şunlara uygulanır

RectangleStylusShape(Double, Double, Double)

Belirtilen genişlik, yükseklik ve açı ile sınıfının yeni bir örneğini RectangleStylusShape başlatır.

public:
 RectangleStylusShape(double width, double height, double rotation);
public RectangleStylusShape (double width, double height, double rotation);
new System.Windows.Ink.RectangleStylusShape : double * double * double -> System.Windows.Ink.RectangleStylusShape
Public Sub New (width As Double, height As Double, rotation As Double)

Parametreler

width
Double

Ekran kalemi şeklinin genişliği.

height
Double

Ekran kalemi şeklinin yüksekliği.

rotation
Double

Ekran kalemi şeklinin açısı.

Örnekler

Aşağıdaki örnekte, üzerinde RectangleStylusShape isabet testi gerçekleştirmek için 'nin nasıl kullanılacağı gösterilmektedir StrokeCollection. Bu örnekte adlı presenterbir InkPresenter olduğu varsayılır.

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

Şunlara uygulanır