Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/PointMarkers/PointMarker.cs @ 13777

Last change on this file since 13777 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 949 bytes
Line 
1using System.Windows;
2using System.Windows.Media;
3
4namespace 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.