RectangleStylusShape Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da RectangleStylusShape classe.
Sobrecargas
| Nome | Descrição |
|---|---|
| RectangleStylusShape(Double, Double) |
Inicializa uma nova instância da RectangleStylusShape classe com a largura e altura especificadas. |
| RectangleStylusShape(Double, Double, Double) |
Inicializa uma nova instância da RectangleStylusShape classe com a largura, altura e ângulo especificados. |
RectangleStylusShape(Double, Double)
Inicializa uma nova instância da RectangleStylusShape classe com a largura e altura especificadas.
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)
Parâmetros
- width
- Double
A largura da forma do estilete.
- height
- Double
A altura da forma do estilete.
Exemplos
O exemplo seguinte demonstra como usar um RectangleStylusShape para realizar testes de acerto num StrokeCollection. Este exemplo assume que existe um InkPresenter chamado 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
Aplica-se a
RectangleStylusShape(Double, Double, Double)
Inicializa uma nova instância da RectangleStylusShape classe com a largura, altura e ângulo especificados.
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)
Parâmetros
- width
- Double
A largura da forma do estilete.
- height
- Double
A altura da forma do estilete.
- rotation
- Double
O ângulo da forma da agulha.
Exemplos
O exemplo seguinte demonstra como usar um RectangleStylusShape para realizar testes de acerto num StrokeCollection. Este exemplo assume que existe um InkPresenter chamado 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