Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 2716 was 1964, checked in by mstoeger, 16 years ago

moved the canvas and the basic types of shapes to their own namespace. #498

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