- Timestamp:
- 03/02/09 22:03:41 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/CompositeShape.cs
r1234 r1240 5 5 namespace HeuristicLab.Visualization { 6 6 public class CompositeShape : IShape { 7 private IShape parent; 8 7 9 protected readonly List<IShape> shapes = new List<IShape>(); 8 10 protected RectangleD boundingBox = RectangleD.Empty; 9 11 10 public virtual void Draw(Graphics graphics , Rectangle parentViewport, RectangleD parentClippingArea) {12 public virtual void Draw(Graphics graphics) { 11 13 foreach (IShape shape in shapes) { 12 shape.Draw(graphics , parentViewport, parentClippingArea);14 shape.Draw(graphics); 13 15 } 14 16 } … … 24 26 } 25 27 28 public RectangleD ClippingArea { 29 get { return Parent.ClippingArea; } 30 } 31 32 public Rectangle Viewport { 33 get { return Parent.Viewport; } 34 } 35 36 public IShape Parent { 37 get { return parent; } 38 set { parent = value; } 39 } 40 26 41 public void ClearShapes() { 27 42 shapes.Clear(); … … 30 45 31 46 public void AddShape(IShape shape) { 47 shape.Parent = this; 48 32 49 if (shapes.Count == 0) { 33 50 boundingBox = shape.BoundingBox;
Note: See TracChangeset
for help on using the changeset viewer.