Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HL-3.2-MonoMigration/HeuristicLab.Visualization/Canvas.cs @ 1875

Last change on this file since 1875 was 635, checked in by mstoeger, 16 years ago

Imported charting framework sources into HeuristicLab.Visualization (#294)

File size: 525 bytes
Line 
1using System.Drawing;
2using System.Drawing.Drawing2D;
3
4namespace HeuristicLab.Visualization {
5  public class Canvas : ICanvas {
6    private WorldShape world;
7
8    public WorldShape WorldShape {
9      get { return world; }
10      set { world = value; }
11    }
12
13    public void Draw(Graphics graphics, Rectangle viewport) {
14      GraphicsState gstate = graphics.Save();
15
16      graphics.SetClip(viewport);
17
18      world.Draw(graphics, viewport, world.BoundingBox);
19
20      graphics.Restore(gstate);
21    }
22  }
23}
Note: See TracBrowser for help on using the repository browser.