Ejemplo n.º 1
0
 public override void Paint(IPlotter plotter, Position position)
 {
     foreach (var p in Paintables)
     {
         p.Paint(plotter, Positions[p].Translate(position));
     }
 }
Ejemplo n.º 2
0
 public virtual void Paint(IPlotter plotter, Position position)
 {
     plotter.SetColor(new Color(255, 255, 255, 255), 2);
     plotter.FillRectangle(position, Size);
     plotter.SetColor(new Color(255, 0, 0, 255), 2);
     plotter.DrawRectangle(position, Size);
     plotter.DrawLine(position, new Position(position.X + Size.Width, position.Y + Size.Height));
     plotter.DrawLine(new Position(position.X + Size.Width, position.Y), new Position(position.X, position.Y + Size.Height));
 }
Ejemplo n.º 3
0
 public Position Translate(Position position)
 {
     return new Position(this.X + position.X, this.Y + position.Y);
 }
Ejemplo n.º 4
0
 public void FillRectangle(Position position, Dimensions size)
 {
     graphics.FillRectangle(GetBrush(), position.X, position.Y, size.Width, size.Height);
 }
Ejemplo n.º 5
0
 public void DrawRectangle(Position position, Dimensions size)
 {
     graphics.DrawRectangle(GetPen(), position.X, position.Y, size.Width, size.Height);
 }
Ejemplo n.º 6
0
 public void DrawLine(Position start, Position end)
 {
     graphics.DrawLine(pen, start.X, start.Y, end.X, end.Y);
 }
Ejemplo n.º 7
0
 public void Add(Paintable paintable, Position position)
 {
     Paintables.Add(paintable);
     Positions[paintable] = position;
 }
Ejemplo n.º 8
0
 public void Add(Paintable paintable, Position position)
 {
     graph.Add(paintable, position);
 }