Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/Shapes/VerticalRange.cs @ 12503

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

#2283 added GUI and charts; fixed MCTS

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Media;
6using System.Windows;
7
8namespace Microsoft.Research.DynamicDataDisplay.Charts
9{
10  /// <summary>
11  /// Paints vertical filled and outlined range in viewport coordinates.
12  /// </summary>
13  public sealed class VerticalRange : RangeHighlight
14  {
15    protected override void UpdateUIRepresentationCore()
16    {
17      var transform = Plotter.Viewport.Transform;
18      DataRect visible = Plotter.Viewport.Visible;
19
20      Point p1_top = new Point(Value1, visible.YMin).DataToScreen(transform);
21      Point p1_bottom = new Point(Value1, visible.YMax).DataToScreen(transform);
22      Point p2_top = new Point(Value2, visible.YMin).DataToScreen(transform);
23      Point p2_bottom = new Point(Value2, visible.YMax).DataToScreen(transform);
24
25      LineGeometry1.StartPoint = p1_top;
26      LineGeometry1.EndPoint = p1_bottom;
27
28      LineGeometry2.StartPoint = p2_top;
29      LineGeometry2.EndPoint = p2_bottom;
30
31      RectGeometry.Rect = new Rect(p1_top, p2_bottom);
32    }
33  }
34}
Note: See TracBrowser for help on using the repository browser.