public override void Paint(IPlotter plotter, Position position) { foreach (var p in Paintables) { p.Paint(plotter, Positions[p].Translate(position)); } }
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)); }
public Position Translate(Position position) { return new Position(this.X + position.X, this.Y + position.Y); }
public void FillRectangle(Position position, Dimensions size) { graphics.FillRectangle(GetBrush(), position.X, position.Y, size.Width, size.Height); }
public void DrawRectangle(Position position, Dimensions size) { graphics.DrawRectangle(GetPen(), position.X, position.Y, size.Width, size.Height); }
public void DrawLine(Position start, Position end) { graphics.DrawLine(pen, start.X, start.Y, end.X, end.Y); }
public void Add(Paintable paintable, Position position) { Paintables.Add(paintable); Positions[paintable] = position; }
public void Add(Paintable paintable, Position position) { graph.Add(paintable, position); }