Class MathRendererPlugin

Class MathRendererPlugin

Το όνομα: Aspose.TeX.Plugins Συγκέντρωση: Aspose.TeX.dll (25.4.0)

Μαθήματα κλάσης Plugin.Το παράδειγμα δείχνει πώς να παραδώσει μια φόρμουλα 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(IPluginΕπιλογές)

Εκτελεί την επεξεργασία Math Renderer με τις καθορισμένες παραμέτρους.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Ένα αντικείμενο επιλογών που περιέχει οδηγίες για το MathRenderer.

Returns

ResultContainer

Ένα αντικείμενο ResultContainer που περιέχει το αποτέλεσμα της λειτουργίας.

Exceptions

ArgumentException

Όταν η περίπτωση επιλογών είναι μηδενική ή έχει ακατάλληλο τύπο,ή μία από τις πηγές εισόδου/εξόδου έχει μη υποστηριζόμενο τύπο.

 Ελληνικά