using System.Windows;
using System.Windows.Media;
namespace Microsoft.Research.DynamicDataDisplay.PointMarkers
{
public delegate void MarkerRenderHandler(DrawingContext dc, Point screenPoint);
/// Renders markers along graph
public abstract class PointMarker : DependencyObject {
/// Renders marker on screen
/// Drawing context to render marker on
/// Point from data source
/// Marker center coordinates on drawing context
public abstract void Render(DrawingContext dc, Point screenPoint);
public static implicit operator PointMarker(MarkerRenderHandler renderer) {
return FromRenderer(renderer);
}
public static PointMarker FromRenderer(MarkerRenderHandler renderer)
{
return new DelegatePointMarker(renderer);
}
}
}