Class FigureRendererPlugin

Class FigureRendererPlugin

Il nome: Aspose.TeX.Plugins Assemblea: Aspose.TeX.dll (25.4.0)

La classe del plugin Renderer.L’esempio mostra come rendere un fragmento LaTeX 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

object FigureRendererPlugin

Implements

IPlugin , IDisposable

I membri ereditari

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()

Dispone di questa instanza.

public void Dispose()

Process(Opzioni IPlugin)

Funziona il trattamento di Figure Renderer con i parametri specificati.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Un oggetto di opzioni che contiene istruzioni per il FigureRenderer.

Returns

ResultContainer

Un oggetto ResultContainer che contiene il risultato dell’operazione.

Exceptions

ArgumentException

Quando l’esempio delle opzioni è zero o ha un tipo inappropriato,o una delle fonti di input/output ha un tipo non supportato.

 Italiano