DynamicRenderer::OnDraw Method (DrawingContext^, StylusPointCollection^, Geometry^, Brush^)
.NET Framework (current version)
Draws the ink in real-time so it appears to "flow" from the tablet pen or other pointing device.
Assembly: PresentationCore (in PresentationCore.dll)
protected: virtual void OnDraw( DrawingContext^ drawingContext, StylusPointCollection^ stylusPoints, Geometry^ geometry, Brush^ fillBrush )
Parameters
- drawingContext
-
Type:
System.Windows.Media::DrawingContext^
The DrawingContext object onto which the stroke is rendered.
- stylusPoints
-
Type:
System.Windows.Input::StylusPointCollection^
The StylusPointCollection that represents the segment of the stroke to draw.
- geometry
-
Type:
System.Windows.Media::Geometry^
A Geometry that represents the path of the mouse pointer.
- fillBrush
-
Type:
System.Windows.Media::Brush^
A Brush that specifies the appearance of the current stroke.
Notes to Inheritors:
When overriding OnDraw in a derived class, be sure to call the base class’s OnDraw method.
The following example demonstrates how to override the OnDraw method to dynamically render digital ink with a LinearGradientBrush.
.NET Framework
Available since 3.0
Available since 3.0
Show: