Example #1
0
 public override void Paint(IPlotter plotter, Position position)
 {
     foreach (var p in Paintables)
     {
         p.Paint(plotter, Positions[p].Translate(position));
     }
 }
 /// <summary>
 /// Get a data plotter for the specified fileid.
 /// </summary>
 /// <param name="savePath">The fileid to store the image at.</param>
 /// <returns>The plotter.</returns>
 private IPlotter GetPlotter(string savePath)
 {
     if (plotter == null)
     {
         plotter = new Plotter(savePath, "png", ImageFormat.Png);
     }
     return plotter;
 }
Example #3
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));
 }
 /// <summary>
 /// Create a chart generator using the specified data plotter.
 /// </summary>
 /// <param name="plotter">The plotter that will render the chart.</param>
 public StatisticsChartGenerator(IPlotter plotter)
 {
     this.plotter = plotter;
 }