Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Visualization/3.2/XAxisGrid.cs @ 1876

Last change on this file since 1876 was 1876, checked in by mstoeger, 15 years ago

x-axis grid can be enabled/disabled #629

File size: 907 bytes
Line 
1using System.Drawing;
2
3namespace 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.