Class MathRendererPlugin

Class MathRendererPlugin

Названий на: Aspose.TeX.Plugins Асамблея: Aspose.TeX.dll (25.4.0)

Матеріальний плагін класу.Приклад показує, як зробити формулу LaTeX в PNG.

// 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

Нападні члени

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

У такому розпорядженні є

public void Dispose()

Process(IPluginOptions)

Працює Math Renderer з зазначеними параметрами.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Об’єкт варіантів, що містить інструкції для MathRenderer.

Returns

ResultContainer

Об’єкт ResultContainer, що містить результат операції.

Exceptions

ArgumentException

Якщо даний варіант є нульовим або має неадекватний тип,або один із джерел входу/виходу має непомітний тип.

 Українська