EllipseStylusShape Konstruktory
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy EllipseStylusShape.
Przeciążenia
EllipseStylusShape(Double, Double) |
Inicjuje EllipseStylusShape nowe wystąpienie klasy o określonej szerokości i wysokości. |
EllipseStylusShape(Double, Double, Double) |
Inicjuje EllipseStylusShape nowe wystąpienie klasy o określonej szerokości, wysokości i kątze. |
Uwagi
W poniższym przykładzie pokazano, jak utworzyć element EllipseStylusShape i przekazać go do GetIncrementalStrokeHitTester metody, aby wymazać część elementu Stroke. W tym przykładzie założono, że istnieje wywołanie eraseTester
i że jego StrokeHit zdarzenie zostało połączone z procedurą IncrementalStrokeHitTester obsługi zdarzeń zdefiniowaną w tym przykładzie. Aby utworzyć kontrolkę umożliwiającą użytkownikowi wymazywanie pisma odręcznego, zobacz Instrukcje: wymazywanie pisma odręcznego w kontrolce niestandardowej.
// Prepare to collect stylus packets. Get the
// IncrementalHitTester from the InkPresenter's
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
eraseTester =
presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the
' IncrementalHitTester from the InkPresenter's
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eraserTip As New EllipseStylusShape(3, 3, 0)
eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
AddHandler eraseTester.StrokeHit, _
AddressOf eraseTester_StrokeHit
eraseTester.AddPoints(e.GetStylusPoints(Me))
End Sub
EllipseStylusShape(Double, Double)
Inicjuje EllipseStylusShape nowe wystąpienie klasy o określonej szerokości i wysokości.
public:
EllipseStylusShape(double width, double height);
public EllipseStylusShape (double width, double height);
new System.Windows.Ink.EllipseStylusShape : double * double -> System.Windows.Ink.EllipseStylusShape
Public Sub New (width As Double, height As Double)
Parametry
- width
- Double
Szerokość kształtu stylu.
- height
- Double
Wysokość kształtu stylu.
Przykłady
W poniższym przykładzie pokazano, jak utworzyć element EllipseStylusShape i przekazać go do GetIncrementalStrokeHitTester metody, aby wymazać część elementu Stroke. W tym przykładzie założono, że istnieje wywołanie eraseTester
i że jego StrokeHit zdarzenie zostało połączone z procedurą IncrementalStrokeHitTester obsługi zdarzeń zdefiniowaną w tym przykładzie. Aby utworzyć kontrolkę umożliwiającą użytkownikowi wymazywanie pisma odręcznego, zobacz Instrukcje: wymazywanie pisma odręcznego w kontrolce niestandardowej.
// Prepare to collect stylus packets. Get the
// IncrementalHitTester from the InkPresenter's
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
eraseTester =
presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the
' IncrementalHitTester from the InkPresenter's
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eraserTip As New EllipseStylusShape(3, 3, 0)
eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
AddHandler eraseTester.StrokeHit, _
AddressOf eraseTester_StrokeHit
eraseTester.AddPoints(e.GetStylusPoints(Me))
End Sub
Dotyczy
EllipseStylusShape(Double, Double, Double)
Inicjuje EllipseStylusShape nowe wystąpienie klasy o określonej szerokości, wysokości i kątze.
public:
EllipseStylusShape(double width, double height, double rotation);
public EllipseStylusShape (double width, double height, double rotation);
new System.Windows.Ink.EllipseStylusShape : double * double * double -> System.Windows.Ink.EllipseStylusShape
Public Sub New (width As Double, height As Double, rotation As Double)
Parametry
- width
- Double
Szerokość kształtu stylu.
- height
- Double
Wysokość kształtu stylu.
- rotation
- Double
Kąt kształtu stylu.
Przykłady
W poniższym przykładzie pokazano, jak utworzyć element EllipseStylusShape i przekazać go do GetIncrementalStrokeHitTester metody, aby wymazać część elementu Stroke. W tym przykładzie założono, że istnieje wywołanie eraseTester
i że jego StrokeHit zdarzenie zostało połączone z procedurą IncrementalStrokeHitTester obsługi zdarzeń zdefiniowaną w tym przykładzie. Aby utworzyć kontrolkę umożliwiającą użytkownikowi wymazywanie pisma odręcznego, zobacz Instrukcje: wymazywanie pisma odręcznego w kontrolce niestandardowej.
// Prepare to collect stylus packets. Get the
// IncrementalHitTester from the InkPresenter's
// StrokeCollection and subscribe to its StrokeHitChanged event.
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
EllipseStylusShape eraserTip = new EllipseStylusShape(3, 3, 0);
eraseTester =
presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip);
eraseTester.StrokeHit += new StrokeHitEventHandler(eraseTester_StrokeHit);
eraseTester.AddPoints(e.GetStylusPoints(this));
}
' Prepare to collect stylus packets. Get the
' IncrementalHitTester from the InkPresenter's
' StrokeCollection and subscribe to its StrokeHitChanged event.
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eraserTip As New EllipseStylusShape(3, 3, 0)
eraseTester = presenter.Strokes.GetIncrementalStrokeHitTester(eraserTip)
AddHandler eraseTester.StrokeHit, _
AddressOf eraseTester_StrokeHit
eraseTester.AddPoints(e.GetStylusPoints(Me))
End Sub