RectangleStylusShape Costruttori
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Inizializza una nuova istanza della classe RectangleStylusShape.
Overload
| Nome | Descrizione |
|---|---|
| RectangleStylusShape(Double, Double) |
Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza e l'altezza specificate. |
| RectangleStylusShape(Double, Double, Double) |
Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza, l'altezza e l'angolo specificati. |
RectangleStylusShape(Double, Double)
Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza e l'altezza specificate.
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)
Parametri
- width
- Double
Larghezza della forma dello stilo.
- height
- Double
Altezza della forma dello stilo.
Esempio
Nell'esempio seguente viene illustrato come usare un RectangleStylusShape oggetto per eseguire hit testing su un oggetto StrokeCollection. In questo esempio si presuppone che sia presente un InkPresenter oggetto denominato 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
Si applica a
RectangleStylusShape(Double, Double, Double)
Inizializza una nuova istanza della RectangleStylusShape classe con la larghezza, l'altezza e l'angolo specificati.
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)
Parametri
- width
- Double
Larghezza della forma dello stilo.
- height
- Double
Altezza della forma dello stilo.
- rotation
- Double
Angolo della forma dello stilo.
Esempio
Nell'esempio seguente viene illustrato come usare un RectangleStylusShape oggetto per eseguire hit testing su un oggetto StrokeCollection. In questo esempio si presuppone che sia presente un InkPresenter oggetto denominato 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