Class FigureRendererPlugin
Contents
[
Hide
]FigureRendererPlugin class
The Figure Renderer plugin class. The example shows how to render a LaTeX fragment in PNG.
// Create the Figure Renderer.
FigureRendererPlugin renderer = new FigureRendererPlugin();
// Create the PngFigureRendererPluginOptions instance and set up options.
PngFigureRendererPluginOptions options = new PngFigureRendererPluginOptions()
{
BackgroundColor = Color.Yellow,
Resolution = 150,
Margin = 10,
Preamble = "LaTeX preamble"
};
// Add an input LaTeX fragment.
options.AddInputDataSource(new StringDataSource("LaTeX fragment"));
// Create a stream to write the image to.
using (Stream stream = File.Open("output path", FileMode.Create))
{
// Add an output stream.
options.AddOutputDataTarget(new StreamDataSource(stream));
// Run the process.
ResultContainer result = renderer.Process(options);
}
public class FigureRendererPlugin : IDisposable, IPlugin
Constructors
Name | Description |
---|---|
FigureRendererPlugin() | The default constructor. |
Methods
Name | Description |
---|---|
Dispose() | Disposes this instance. |
Process(IPluginOptions) | Runs Figure Renderer processing with the specified parameters. |
See Also
- interface IPlugin
- namespace Aspose.TeX.Plugins
- assembly Aspose.TeX