Пример #1
0
        public static void Save(PlotModel model, Stream s, double width, double height)
        {
            var svgrc = new PdfRenderContext(width, height);

            model.Render(svgrc);
            svgrc.Save(s);
        }
Пример #2
0
 /// <summary>
 /// Exports the specified <see cref="PlotModel" /> to the specified <see cref="Stream" />.
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="stream">The stream.</param>
 public void Export(IPlotModel model, Stream stream)
 {
     using (var rc = new PdfRenderContext(this.Width, this.Height, this.Background))
     {
         model.Update(true);
         model.Render(rc, this.Width, this.Height);
         rc.Save(stream);
     }
 }
Пример #3
0
 /// <summary>
 /// Exports the specified model to a stream.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 /// <param name="s">
 /// The stream.
 /// </param>
 /// <param name="width">
 /// The width (points).
 /// </param>
 /// <param name="height">
 /// The height (points).
 /// </param>
 public static void Export(PlotModel model, Stream s, double width, double height)
 {
     using (var rc = new PdfRenderContext(width, height, model.Background))
     {
         model.Update();
         model.Render(rc, width, height);
         rc.Save(s);
     }
 }
Пример #4
0
 /// <summary>
 /// Exports the specified <see cref="PlotModel" /> to the specified <see cref="Stream" />.
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="stream">The stream.</param>
 public void Export(IPlotModel model, Stream stream)
 {
     using (var rc = new PdfRenderContext(this.Width, this.Height, this.Background))
     {
         model.Update(true);
         model.Render(rc, this.Width, this.Height);
         rc.Save(stream);
     }
 }
Пример #5
0
 /// <summary>
 /// Exports the specified model to a stream.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 /// <param name="s">
 /// The stream.
 /// </param>
 /// <param name="width">
 /// The width (points).
 /// </param>
 /// <param name="height">
 /// The height (points).
 /// </param>
 public static void Export(PlotModel model, Stream s, double width, double height)
 {
     using (var rc = new PdfRenderContext(width, height, model.Background))
     {
         model.Update();
         model.Render(rc, width, height);
         rc.Save(s);
     }
 }
Пример #6
0
 public static void Save(PlotModel model, Stream s, double width, double height)
 {
     var svgrc = new PdfRenderContext(width, height);
     model.Render(svgrc);
     svgrc.Save(s);
 }