Changeset 1046
- Timestamp:
- 12/21/08 19:51:05 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Visualization
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Visualization/XAxis.cs
r1038 r1046 3 3 4 4 namespace HeuristicLab.Visualization { 5 // TODO move to own file6 public class TextShape : IShape {7 private double x;8 private double y;9 private string text;10 11 private Font font;12 private Color color;13 private Brush brush;14 15 public TextShape(double x, double y, string text) : this(x, y, text, 8) {}16 17 public TextShape(double x, double y, string text, int fontSize) {18 this.x = x;19 this.y = y;20 this.text = text;21 this.font = new Font("Arial", fontSize);22 23 this.Color = Color.Blue;24 }25 26 public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {27 int screenX = Transform.ToScreenX(x, viewport, clippingArea);28 int screenY = Transform.ToScreenY(y, viewport, clippingArea);29 30 graphics.DrawString(text, font, brush, screenX, screenY);31 }32 33 public RectangleD BoundingBox {34 get { return RectangleD.Empty; }35 }36 37 public string Text {38 get { return text; }39 set { text = value; }40 }41 42 public double X {43 get { return x; }44 set { x = value; }45 }46 47 public double Y {48 get { return y; }49 set { y = value; }50 }51 52 public Color Color {53 get { return color; }54 set {55 this.color = value;56 this.brush = new SolidBrush(color);57 }58 }59 }60 5 61 6 public class XAxis : WorldShape {
Note: See TracChangeset
for help on using the changeset viewer.