Last change
on this file since 1822 was
1530,
checked in by gkronber, 16 years ago
|
Moved source files of plugins Hive ... Visualization.Test into version-specific sub-folders. #576
|
File size:
2.0 KB
|
Rev | Line | |
---|
[1182] | 1 | using System.Drawing;
|
---|
| 2 |
|
---|
| 3 | namespace HeuristicLab.Visualization {
|
---|
| 4 | public class Grid : WorldShape {
|
---|
[1458] | 5 | private Color color = Color.LightBlue;
|
---|
| 6 |
|
---|
[1240] | 7 | public override void Draw(Graphics graphics) {
|
---|
| 8 | ClearShapes();
|
---|
[1182] | 9 |
|
---|
[1233] | 10 | foreach (double y in AxisTicks.GetTicks(YAxis.PixelsPerInterval,
|
---|
[1240] | 11 | Parent.Viewport.Height,
|
---|
[1233] | 12 | ClippingArea.Height,
|
---|
| 13 | ClippingArea.Y1)) {
|
---|
[1182] | 14 | LineShape line = new LineShape(ClippingArea.X1, y,
|
---|
| 15 | ClippingArea.X2, y,
|
---|
[1458] | 16 | color, 1,
|
---|
[1233] | 17 | DrawingStyle.Dashed);
|
---|
[1240] | 18 | AddShape(line);
|
---|
[1182] | 19 | }
|
---|
| 20 |
|
---|
[1233] | 21 | foreach (double x in AxisTicks.GetTicks(XAxis.PixelsPerInterval,
|
---|
[1240] | 22 | Parent.Viewport.Width,
|
---|
[1233] | 23 | ClippingArea.Width,
|
---|
| 24 | ClippingArea.X1)) {
|
---|
[1182] | 25 | LineShape line = new LineShape(x, ClippingArea.Y1,
|
---|
| 26 | x, ClippingArea.Y2,
|
---|
[1458] | 27 | color, 1,
|
---|
[1233] | 28 | DrawingStyle.Dashed);
|
---|
[1240] | 29 | AddShape(line);
|
---|
[1182] | 30 | }
|
---|
| 31 |
|
---|
| 32 | LineShape lineZeroX = new LineShape(0, ClippingArea.Y1,
|
---|
| 33 | 0, ClippingArea.Y2,
|
---|
[1458] | 34 | color, 3,
|
---|
[1233] | 35 | DrawingStyle.Dashed);
|
---|
[1182] | 36 |
|
---|
| 37 | LineShape lineZeroY = new LineShape(ClippingArea.X1, 0,
|
---|
| 38 | ClippingArea.X2, 0,
|
---|
[1458] | 39 | color, 3,
|
---|
[1233] | 40 | DrawingStyle.Dashed);
|
---|
[1182] | 41 |
|
---|
[1240] | 42 | AddShape(lineZeroX);
|
---|
| 43 | AddShape(lineZeroY);
|
---|
[1182] | 44 |
|
---|
[1240] | 45 | base.Draw(graphics);
|
---|
[1182] | 46 | }
|
---|
[1458] | 47 |
|
---|
| 48 | public Color Color {
|
---|
| 49 | get { return color; }
|
---|
| 50 | set { color = value; }
|
---|
| 51 | }
|
---|
[1182] | 52 | }
|
---|
| 53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.