Changeset 1195
- Timestamp:
- 01/30/09 17:53:52 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 added
- 5 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.Test/LegendForm.cs
r1048 r1195 14 14 private void CreateLegendShape() { 15 15 WorldShape mainShape = canvasUI.MainCanvas.WorldShape; 16 LegendShape ls = new LegendShape( 0, 0, 100, 100, 0, Color.White);16 LegendShape ls = new LegendShape(); 17 17 ls.AddLegendItem(new LegendItem("test", Color.Black, 5)); 18 18 ls.AddLegendItem(new LegendItem("test2", Color.Red, 5)); -
trunk/sources/HeuristicLab.Visualization/HeuristicLab.Visualization.csproj
r1194 r1195 87 87 <Compile Include="LabelProvider\ILabelProvider.cs" /> 88 88 <Compile Include="IMouseEventListener.cs" /> 89 <Compile Include="Options Dialog.cs">89 <Compile Include="Options\OptionsDialog.cs"> 90 90 <SubType>Form</SubType> 91 91 </Compile> 92 <Compile Include="Options Dialog.Designer.cs">92 <Compile Include="Options\OptionsDialog.Designer.cs"> 93 93 <DependentUpon>OptionsDialog.cs</DependentUpon> 94 94 </Compile> … … 147 147 <SubType>Designer</SubType> 148 148 </EmbeddedResource> 149 <EmbeddedResource Include="Options Dialog.resx">149 <EmbeddedResource Include="Options\OptionsDialog.resx"> 150 150 <DependentUpon>OptionsDialog.cs</DependentUpon> 151 151 </EmbeddedResource> -
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)); -
trunk/sources/HeuristicLab.Visualization/LineChart.cs
r1187 r1195 5 5 using System.Windows.Forms; 6 6 using HeuristicLab.Core; 7 using HeuristicLab.Visualization.Options; 7 8 8 9 namespace HeuristicLab.Visualization { … … 55 56 root.AddShape(linesShape); 56 57 57 legendShape = new LegendShape(0, 0, 0, 0, 0, Color.Black);58 //legendShape.AddLegendItem(new LegendItem("test", Color.Red, 5));59 //legendShape.AddLegendItem(new LegendItem("test1", Color.Blue, 5));60 //legendShape.AddLegendItem(new LegendItem("test2", Color.Pink, 5));61 root.AddShape(legendShape);62 63 58 xAxis = new XAxis(); 64 59 root.AddShape(xAxis); … … 72 67 minMaxLineShape = new MinMaxLineShape(this.minDataValue, this.maxDataValue, 0, Color.Yellow, 4, DrawingStyle.Solid); 73 68 root.AddShape(minMaxLineShape); 69 70 legendShape = new LegendShape(); 71 root.AddShape(legendShape); 72 74 73 canvas.MainCanvas.WorldShape = root; 75 74 canvas.Resize += delegate { UpdateLayout(); }; 76 75 77 76 UpdateLayout(); 78 77 maxDataRowCount = 0; … … 117 116 118 117 legendShape.BoundingBox = new RectangleD(10, 10, 110, canvas.Height - 50); 118 legendShape.ClippingArea = new RectangleD(0, 0, legendShape.BoundingBox.Width, 119 legendShape.BoundingBox.Height); 119 120 } 120 121
Note: See TracChangeset
for help on using the changeset viewer.