Class FigureRendererPlugin

Class FigureRendererPlugin

Numele spaţiului: Aspose.TeX.Plugins Asamblare: Aspose.TeX.dll (25.4.0)

Clasa de Plugin Renderer.Exemplul arată cum se face un fragment LaTeX în 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

Membrii moștenitori

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

dispune de această instanţă.

public void Dispose()

Process(Opțiuni IPlugin)

Funcționează procesarea Figure Renderer cu parametrii specificati.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Un obiect de opțiuni care conține instrucțiuni pentru FigureRenderer.

Returns

ResultContainer

Un obiect ResultContainer care conține rezultatul operațiunii.

Exceptions

ArgumentException

În cazul în care un anumit tip de opțiune este zero sau are un tip inadecvat,sau una dintre sursele de intrare/de ieșire are tipul nesuportat.

 Română