Changeset 861 for trunk/sources/HeuristicLab.Visualization/LineShape.cs
- Timestamp:
- 11/29/08 12:19:58 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/LineShape.cs
r754 r861 3 3 namespace HeuristicLab.Visualization { 4 4 public class LineShape : IShape { 5 private RectangleD bounding Rect;5 private RectangleD boundingBox; 6 6 private double z; 7 7 private Color color; … … 16 16 /// <param name="color">color for the LineShape</param> 17 17 public LineShape(double x1, double y1, double x2, double y2, double z, Color color) { 18 this.bounding Rect= new RectangleD(x1, y1, x2, y2);18 this.boundingBox = new RectangleD(x1, y1, x2, y2); 19 19 this.z = z; 20 20 this.color = color; … … 22 22 23 23 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; } 25 45 } 26 46 … … 33 53 public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) { 34 54 using (Pen pen = new Pen(color, 3)){ 35 Rectangle screenRect = Transform.ToScreen(bounding Rect, viewport, clippingArea);55 Rectangle screenRect = Transform.ToScreen(boundingBox, viewport, clippingArea); 36 56 graphics.DrawLine(pen,screenRect.Left, screenRect.Bottom, screenRect.Right, screenRect.Top); 37 57 }
Note: See TracChangeset
for help on using the changeset viewer.