Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/30/09 17:53:52 (16 years ago)
Author:
shofstad
Message:

Legend implementation changed (#407)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

    • Property svn:ignore
      •  

        old new  
        33HeuristicLab.resharper
        44HeuristicLab.resharper.user
         5HeuristicLab.4.1.resharper.user
  • trunk/sources/HeuristicLab.Visualization/LegendShape.cs

    r1049 r1195  
    1616
    1717
    18   public class LegendShape : CompositeShape {
    19     private RectangleD boundingBox;
    20     private Color color;
    21 
     18  public class LegendShape : WorldShape {
    2219    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() {
    2822      CreateLegend();
    2923    }
    3024
    31     public double Z { get; set; }
    32 
    33     public RectangleD BoundingBox {
    34       get { return boundingBox; }
    35       set { boundingBox = value; }
    36     }
    37 
    3825    public void CreateLegend() {
    39       double y = boundingBox.Y2;
     26      shapes.Clear();
     27      double y = BoundingBox.Y2;
    4028      foreach (LegendItem item in legendItems) {
    4129        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.