Rev | Line | |
---|
[12503] | 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 |
|
---|
| 8 | namespace 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.