Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/09 22:03:41 (15 years ago)
Author:
mstoeger
Message:

Transformations on shapes are possible outside of the Draw method. (#424)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/LineShape.cs

    r1234 r1240  
    44namespace HeuristicLab.Visualization {
    55  public class LineShape : IShape {
     6    private IShape parent;
    67    private RectangleD boundingBox;
    78
     
    3334    }
    3435
     36    public RectangleD ClippingArea {
     37      get { return Parent.ClippingArea; }
     38    }
     39
     40    public Rectangle Viewport {
     41      get { return Parent.Viewport; }
     42    }
     43
     44    public IShape Parent {
     45      get { return parent; }
     46      set { parent = value; }
     47    }
     48
    3549    public double Y1 {
    3650      get { return boundingBox.Y1; }
     
    5771    /// </summary>
    5872    /// <param name="graphics">graphics handle to draw to</param>
    59     /// <param name="parentViewport">rectangle in value-coordinates to display</param>
    60     /// <param name="parentClippingArea">rectangle in screen-coordinates to draw</param>
    61     public void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
    62       Rectangle screenRect = Transform.ToScreen(boundingBox, parentViewport, parentClippingArea);
     73    public void Draw(Graphics graphics) {
     74      Rectangle screenRect = Transform.ToScreen(boundingBox, Parent.Viewport, Parent.ClippingArea);
    6375
    6476      graphics.DrawLine(GetPen(), screenRect.Left, screenRect.Bottom, screenRect.Right, screenRect.Top);
Note: See TracChangeset for help on using the changeset viewer.