Class FigureRendererPlugin

Class FigureRendererPlugin

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

Klasa wtyczki Renderer Figure.
Przykład pokazuje, jak renderować fragment LaTeX w formacie PNG.

// Utwórz Renderer Figure.
FigureRendererPlugin renderer = new FigureRendererPlugin();
// Utwórz instancję PngFigureRendererPluginOptions i skonfiguruj opcje.
PngFigureRendererPluginOptions options = new PngFigureRendererPluginOptions()
{
    BackgroundColor = Color.Yellow,
    Resolution = 150,
    Margin = 10,
    Preamble = "Wstęp LaTeX"
};
// Dodaj źródło danych wejściowych LaTeX.
options.AddInputDataSource(new StringDataSource("Fragment LaTeX"));
// Utwórz strumień do zapisu obrazu.
using (Stream stream = File.Open("ścieżka wyjściowa", FileMode.Create))
{
    // Dodaj strumień wyjściowy.
    options.AddOutputDataTarget(new StreamDataSource(stream));
    // Uruchom proces.
    ResultContainer result = renderer.Process(options);
}
public class FigureRendererPlugin : IPlugin, IDisposable

Dziedziczenie

objectFigureRendererPlugin

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

Konstruktorzy

FigureRendererPlugin()

public FigureRendererPlugin()

Metody

Dispose()

Zwalnia tę instancję.

public void Dispose()

Process(IPluginOptions)

Uruchamia przetwarzanie Renderer Figure z określonymi parametrami.

public ResultContainer Process(IPluginOptions options)

Parametry

options IPluginOptions

Obiekt opcji zawierający instrukcje dla FigureRenderer.

Zwraca

ResultContainer

Obiekt ResultContainer zawierający wynik operacji.

Wyjątki

ArgumentException

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

 Polski