Class FigureRendererPlugin

Class FigureRendererPlugin

Namespace: Aspose.TeX.Plugins
Assembly: Aspose.TeX.dll (25.2.0)

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);
}
```</example>

```csharp
public class FigureRendererPlugin : IPlugin, IDisposable

Inheritance

objectFigureRendererPlugin

Implements

IPlugin, IDisposable

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

FigureRendererPlugin()

public FigureRendererPlugin()

Methods

Dispose()

Disposes this instance.

public void Dispose()

Process(IPluginOptions)

Runs Figure Renderer processing with the specified parameters.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

An options object containing instructions for the FigureRenderer.

Returns

ResultContainer

An ResultContainer object containing the result of the operation.

Exceptions

ArgumentException

When given options instance is null or has inappropriate type, or one of the input/output sources has unsupported type.

 English