Changeset 1233 for trunk/sources/HeuristicLab.Visualization/Legend
- Timestamp:
- 02/28/09 21:21:59 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization/Legend
- Files:
-
- 2 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/Legend/LegendShape.cs
r1232 r1233 1 1 using System.Collections.Generic; 2 using System.Drawing;2 using HeuristicLab.Visualization.Legend; 3 3 4 namespace HeuristicLab.Visualization { 5 public class LegendItem { 6 public LegendItem(string label, Color color, int thickness) { 7 Label = label; 8 Color = color; 9 Thickness = thickness; 10 } 11 12 public string Label { get; set; } 13 public Color Color { get; set; } 14 public int Thickness { get; set; } 15 } 16 17 4 namespace HeuristicLab.Visualization.Legend { 18 5 public class LegendShape : WorldShape { 19 6 private readonly IList<LegendItem> legendItems = new List<LegendItem>(); … … 27 14 double y = ClippingArea.Y2; 28 15 foreach (LegendItem item in legendItems) { 29 AddShape(new LineShape(10, y - 10, 30, y - 10, 0,item.Color, item.Thickness, DrawingStyle.Solid));16 AddShape(new LineShape(10, y - 10, 30, y - 10, item.Color, item.Thickness, DrawingStyle.Solid)); 30 17 AddShape(new TextShape(35, y, item.Label)); 31 18 y -= 15;
Note: See TracChangeset
for help on using the changeset viewer.