Class MathRendererPlugin

Class MathRendererPlugin

nazivni prostor: Aspose.TeX.Plugins Sastav: Aspose.TeX.dll (25.4.0)

Plugin razred MathRenderer.Primjer pokazuje kako napraviti LaTeX formulu u PNG-u.

// Create MathRenderer.
MathRendererPlugin renderer = new MathRendererPlugin();
// Create the PngMathRendererPluginOptions instance and set up options.
PngMathRendererPluginOptions options = new PngMathRendererPluginOptions()
{
    BackgroundColor = Color.Yellow,
    TextColor = Color.Blue,
    Resolution = 150,
    Margin = 10,
    Preamble = "LaTeX preamble"
};
// Add a source formula.
options.AddInputDataSource(new StringDataSource("LaTeX formula"));
// 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 MathRendererPlugin : IPlugin, IDisposable

Inheritance

object MathRendererPlugin

Implements

IPlugin , IDisposable

naslijeđeni članovi

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

Constructors

MathRendererPlugin()

public MathRendererPlugin()

Methods

Dispose()

Na raspolaganju je taj nalog.

public void Dispose()

Process(IPluginopcije)

Runs Math Renderer obrađivanje s određenim parametrima.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Objekt opcija koji sadrži upute za MathRenderer.

Returns

ResultContainer

Objekt ResultContainer koji sadrži rezultat operacije.

Exceptions

ArgumentException

Ako je određena opcija nula ili ima neprimjerenu vrstu,ili jedan od izvora ulaza/izlaska ima nepomoćnu vrstu.

 Hrvatski