Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/28/09 21:21:59 (16 years ago)
Author:
mstoeger
Message:

General housekeeping (#498) Removed some old unused Z-Order values. Replaced some var types by concrete types. Renamed some LineShape properties. Added caching of Pens and Brushes in LineShape and RectangleShape. Put axis tick calculation algorithm into its own class.

Location:
trunk/sources/HeuristicLab.Visualization/Legend
Files:
2 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/Legend/LegendShape.cs

    r1232 r1233  
    11using System.Collections.Generic;
    2 using System.Drawing;
     2using HeuristicLab.Visualization.Legend;
    33
    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 
     4namespace HeuristicLab.Visualization.Legend {
    185  public class LegendShape : WorldShape {
    196    private readonly IList<LegendItem> legendItems = new List<LegendItem>();
     
    2714      double y = ClippingArea.Y2;
    2815      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));
    3017        AddShape(new TextShape(35, y, item.Label));
    3118        y -= 15;
Note: See TracChangeset for help on using the changeset viewer.