// --------------------------------------------------------------------------------------------------------------------
//
// Copyright (c) 2014 OxyPlot contributors
//
//
// Provides functionality to export plots to scalable vector graphics using for text measuring.
//
// --------------------------------------------------------------------------------------------------------------------
namespace OxyPlot.WindowsForms
{
using System;
using System.Drawing;
///
/// Provides functionality to export plots to scalable vector graphics using for text measuring.
///
public class SvgExporter : OxyPlot.SvgExporter, IDisposable
{
///
/// The graphics drawing surface.
///
private Graphics g;
///
/// The render context.
///
private GraphicsRenderContext grc;
///
/// Initializes a new instance of the class.
///
public SvgExporter()
{
this.g = Graphics.FromHwnd(IntPtr.Zero);
this.TextMeasurer = this.grc = new GraphicsRenderContext(this.g);
}
///
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
///
public void Dispose()
{
this.g.Dispose();
this.grc.Dispose();
}
}
}