Class MathRendererPlugin

Class MathRendererPlugin

Namespace: Aspose.TeX.Plugins
Assembly: Aspose.TeX.dll

Classe du plugin MathRenderer.
L’exemple montre comment rendre une formule LaTeX en PNG.

// Créer MathRenderer.
MathRendererPlugin renderer = new MathRendererPlugin();
// Créer l'instance PngMathRendererPluginOptions et configurer les options.
PngMathRendererPluginOptions options = new PngMathRendererPluginOptions()
{
    BackgroundColor = Color.Yellow,
    TextColor = Color.Blue,
    Resolution = 150,
    Margin = 10,
    Preamble = "Préambule LaTeX"
};
// Ajouter une formule source.
options.AddInputDataSource(new StringDataSource("formule LaTeX"));
// Créer un flux pour écrire l'image.
using (Stream stream = File.Open("chemin de sortie", FileMode.Create))
{
    // Ajouter un flux de sortie.
    options.AddOutputDataTarget(new StreamDataSource(stream));
    // Exécuter le processus.
    ResultContainer result = renderer.Process(options);
}
public class MathRendererPlugin : IPlugin, IDisposable

Héritage

objectMathRendererPlugin

Implémente

IPlugin, IDisposable

Membres hérités

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

Constructeurs

MathRendererPlugin()

public MathRendererPlugin()

Méthodes

Dispose()

Dispose de cette instance.

public void Dispose()

Process(IPluginOptions)

Exécute le traitement Math Renderer avec les paramètres spécifiés.

public ResultContainer Process(IPluginOptions options)

Paramètres

options IPluginOptions

Un objet d’options contenant des instructions pour le MathRenderer.

Retourne

ResultContainer

Un objet ResultContainer contenant le résultat de l’opération.

Exceptions

ArgumentException

Lorsque l’instance d’options donnée est nulle ou a un type inapproprié, ou que l’une des sources d’entrée/sortie a un type non pris en charge.

 Français