Class MathRendererPlugin

Class MathRendererPlugin

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

Klasa wtyczki MathRenderer.
Przykład pokazuje, jak renderować formułę LaTeX w formacie PNG.

// Utwórz MathRenderer.
MathRendererPlugin renderer = new MathRendererPlugin();
// Utwórz instancję PngMathRendererPluginOptions i skonfiguruj opcje.
PngMathRendererPluginOptions options = new PngMathRendererPluginOptions()
{
    BackgroundColor = Color.Yellow,
    TextColor = Color.Blue,
    Resolution = 150,
    Margin = 10,
    Preamble = "Wstęp LaTeX"
};
// Dodaj źródło formuły.
options.AddInputDataSource(new StringDataSource("formuła LaTeX"));
// Utwórz strumień do zapisu obrazu.
using (Stream stream = File.Open("ścieżka wyjścia", FileMode.Create))
{
    // Dodaj strumień wyjściowy.
    options.AddOutputDataTarget(new StreamDataSource(stream));
    // Uruchom proces.
    ResultContainer result = renderer.Process(options);
}
public class MathRendererPlugin : IPlugin, IDisposable

Dziedziczenie

objectMathRendererPlugin

Implementuje

IPlugin, IDisposable

Członkowie dziedziczeni

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

Konstruktory

MathRendererPlugin()

public MathRendererPlugin()

Metody

Dispose()

Zwalnia tę instancję.

public void Dispose()

Process(IPluginOptions)

Uruchamia przetwarzanie Math Renderer z określonymi parametrami.

public ResultContainer Process(IPluginOptions options)

Parametry

options IPluginOptions

Obiekt opcji zawierający instrukcje dla MathRenderer.

Zwraca

ResultContainer

Obiekt ResultContainer zawierający wynik operacji.

Wyjątki

ArgumentException

Gdy podana instancja opcji jest null lub ma niewłaściwy typ, lub jedno z źródeł wejściowych/wyjściowych ma nieobsługiwany typ.

 Polski