예제 #1
0
 /// <summary>
 /// Exports the specified model.
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="fileName">The file name.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="background">The background.</param>
 public static void Export(IPlotModel model, string fileName, int width, int height, Brush background = null)
 {
     var exporter = new PngExporter { Width = width, Height = height, Background = background.ToOxyColor() };
     using (var stream = File.Create(fileName))
     {
         exporter.Export(model, stream);
     }
 }