Line | |
---|
1 | using System.Windows;
|
---|
2 | using System.Windows.Media;
|
---|
3 |
|
---|
4 | namespace Microsoft.Research.DynamicDataDisplay.PointMarkers
|
---|
5 | {
|
---|
6 | public delegate void MarkerRenderHandler(DrawingContext dc, Point screenPoint);
|
---|
7 |
|
---|
8 | /// <summary>Renders markers along graph</summary>
|
---|
9 | public abstract class PointMarker : DependencyObject {
|
---|
10 |
|
---|
11 | /// <summary>Renders marker on screen</summary>
|
---|
12 | /// <param name="dc">Drawing context to render marker on</param>
|
---|
13 | /// <param name="dataPoint">Point from data source</param>
|
---|
14 | /// <param name="screenPoint">Marker center coordinates on drawing context</param>
|
---|
15 | public abstract void Render(DrawingContext dc, Point screenPoint);
|
---|
16 |
|
---|
17 | public static implicit operator PointMarker(MarkerRenderHandler renderer) {
|
---|
18 | return FromRenderer(renderer);
|
---|
19 | }
|
---|
20 |
|
---|
21 | public static PointMarker FromRenderer(MarkerRenderHandler renderer)
|
---|
22 | {
|
---|
23 | return new DelegatePointMarker(renderer);
|
---|
24 | }
|
---|
25 | }
|
---|
26 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.