RectangleStylusShape Constructors
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de RectangleStylusShape klasse.
Overloads
| Naam | Description |
|---|---|
| RectangleStylusShape(Double, Double) |
Initialiseert een nieuw exemplaar van de RectangleStylusShape klasse met de opgegeven breedte en hoogte. |
| RectangleStylusShape(Double, Double, Double) |
Initialiseert een nieuw exemplaar van de RectangleStylusShape klasse met de opgegeven breedte, hoogte en hoek. |
RectangleStylusShape(Double, Double)
Initialiseert een nieuw exemplaar van de RectangleStylusShape klasse met de opgegeven breedte en hoogte.
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)
Parameters
- width
- Double
De breedte van de stylusvorm.
- height
- Double
De hoogte van de stylusvorm.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een RectangleStylusShape test uitvoert om hittests uit te voeren op een StrokeCollection. In dit voorbeeld wordt ervan uitgegaan dat er een InkPresenter aangeroepen presenternaam is.
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
Van toepassing op
RectangleStylusShape(Double, Double, Double)
Initialiseert een nieuw exemplaar van de RectangleStylusShape klasse met de opgegeven breedte, hoogte en hoek.
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)
Parameters
- width
- Double
De breedte van de stylusvorm.
- height
- Double
De hoogte van de stylusvorm.
- rotation
- Double
De hoek van de stylusvorm.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een RectangleStylusShape test uitvoert om hittests uit te voeren op een StrokeCollection. In dit voorbeeld wordt ervan uitgegaan dat er een InkPresenter aangeroepen presenternaam is.
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