Changeset 1195 for trunk/sources/HeuristicLab.Visualization/LegendShape.cs
- Timestamp:
- 01/30/09 17:53:52 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:ignore
-
old new 3 3 HeuristicLab.resharper 4 4 HeuristicLab.resharper.user 5 HeuristicLab.4.1.resharper.user
-
- Property svn:ignore
-
trunk/sources/HeuristicLab.Visualization/LegendShape.cs
r1049 r1195 16 16 17 17 18 public class LegendShape : CompositeShape { 19 private RectangleD boundingBox; 20 private Color color; 21 18 public class LegendShape : WorldShape { 22 19 private readonly IList<LegendItem> legendItems = new List<LegendItem>(); 23 24 public LegendShape(double x1, double y1, double x2, double y2, double z, Color color) { 25 boundingBox = new RectangleD(x1, y1, x2, y2); 26 Z = z; 27 this.color = color; 20 21 public LegendShape() { 28 22 CreateLegend(); 29 23 } 30 24 31 public double Z { get; set; }32 33 public RectangleD BoundingBox {34 get { return boundingBox; }35 set { boundingBox = value; }36 }37 38 25 public void CreateLegend() { 39 double y = boundingBox.Y2; 26 shapes.Clear(); 27 double y = BoundingBox.Y2; 40 28 foreach (LegendItem item in legendItems) { 41 29 AddShape(new LineShape(10, y - 10, 30, y - 10, 0, item.Color, item.Thickness, DrawingStyle.Solid));
Note: See TracChangeset
for help on using the changeset viewer.