Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/PointMarkers/DelegatePointMarker.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: 731 bytes
Line 
1using System;
2using System.Windows;
3using System.Windows.Media;
4
5namespace Microsoft.Research.DynamicDataDisplay.PointMarkers
6{
7    /// <summary>Invokes specified delegate for rendering custon marker
8    /// at every point of graph</summary>
9  public sealed class DelegatePointMarker : PointMarker {
10    public MarkerRenderHandler RenderCallback { get; set; }
11
12    public DelegatePointMarker() { }
13    public DelegatePointMarker(MarkerRenderHandler renderCallback) {
14      if (renderCallback == null)
15        throw new ArgumentNullException("renderCallback");
16 
17      RenderCallback = renderCallback;
18    }
19
20    public override void Render(DrawingContext dc, Point screenPoint) {
21      RenderCallback(dc, screenPoint);
22    }
23  }
24}
Note: See TracBrowser for help on using the repository browser.