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