Line | |
---|
1 | using System.Drawing;
|
---|
2 |
|
---|
3 | namespace HeuristicLab.Visualization {
|
---|
4 | public class XAxisGrid : WorldShape {
|
---|
5 | private Color color = Color.LightBlue;
|
---|
6 |
|
---|
7 | public override void Draw(Graphics graphics) {
|
---|
8 | ClearShapes();
|
---|
9 |
|
---|
10 | foreach (double x in AxisTicks.GetTicks(XAxis.PixelsPerInterval,
|
---|
11 | Parent.Viewport.Width,
|
---|
12 | ClippingArea.Width,
|
---|
13 | ClippingArea.X1)) {
|
---|
14 | LineShape line = new LineShape(x, ClippingArea.Y1,
|
---|
15 | x, ClippingArea.Y2,
|
---|
16 | color, 1,
|
---|
17 | DrawingStyle.Dashed);
|
---|
18 | AddShape(line);
|
---|
19 | }
|
---|
20 |
|
---|
21 | base.Draw(graphics);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public Color Color {
|
---|
25 | get { return color; }
|
---|
26 | set { color = value; }
|
---|
27 | }
|
---|
28 | }
|
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.