Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/29/08 12:19:58 (16 years ago)
Author:
mstoeger
Message:

Adjustments on LineChart for new interface. #345

File:
1 edited

Legend:

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

    r754 r861  
    33namespace HeuristicLab.Visualization {
    44  public class LineShape : IShape {
    5     private RectangleD boundingRect;
     5    private RectangleD boundingBox;
    66    private double z;
    77    private Color color;
     
    1616    /// <param name="color">color for the LineShape</param>
    1717    public LineShape(double x1, double y1, double x2, double y2, double z, Color color) {
    18       this.boundingRect = new RectangleD(x1, y1, x2, y2);
     18      this.boundingBox = new RectangleD(x1, y1, x2, y2);
    1919      this.z = z;
    2020      this.color = color;
     
    2222
    2323    public RectangleD BoundingBox {
    24       get { return boundingRect; }
     24      get { return boundingBox; }
     25    }
     26
     27    public double Y1 {
     28      get { return boundingBox.Y1; }
     29      set { boundingBox.Y1 = value; }
     30    }
     31
     32    public double Y2 {
     33      get { return boundingBox.Y2; }
     34      set { boundingBox.Y2 = value; }
     35    }
     36
     37    public double X1 {
     38      get { return boundingBox.X1; }
     39      set { boundingBox.X1 = value; }
     40    }
     41
     42    public double X2 {
     43      get { return boundingBox.X2; }
     44      set { boundingBox.X2 = value; }
    2545    }
    2646
     
    3353    public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
    3454      using (Pen pen = new Pen(color, 3)){
    35         Rectangle screenRect = Transform.ToScreen(boundingRect, viewport, clippingArea);
     55        Rectangle screenRect = Transform.ToScreen(boundingBox, viewport, clippingArea);
    3656        graphics.DrawLine(pen,screenRect.Left, screenRect.Bottom, screenRect.Right, screenRect.Top);
    3757      }
Note: See TracChangeset for help on using the changeset viewer.