Class MathRendererPlugin

Class MathRendererPlugin

A név: Aspose.TeX.Plugins Összefoglaló: Aspose.TeX.dll (25.4.0)

MathRenderer Plugin osztály.A példa azt mutatja, hogyan lehet a LaTeX képlet PNG-ben.

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

Örökletes tagok

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

Ez az eljárás rendelkezésre áll.

public void Dispose()

Process(IPluginOpciók)

A Math Renderer feldolgozása a meghatározott paraméterekkel történik.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Egy opció objektum, amely a MathRenderer utasításait tartalmazza.

Returns

ResultContainer

Egy ResultContainer objektum, amely tartalmazza a művelet eredményét.

Exceptions

ArgumentException

Ha az adott opciós példa nulla vagy nem megfelelő típusú,vagy az egyik belépési / kimeneti forrás nem támogatott típusú.

 Magyar