Last change
on this file since 786 was
635,
checked in by mstoeger, 16 years ago
|
Imported charting framework sources into HeuristicLab.Visualization (#294)
|
File size:
525 bytes
|
Line | |
---|
1 | using System.Drawing;
|
---|
2 | using System.Drawing.Drawing2D;
|
---|
3 |
|
---|
4 | namespace 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.