Class MathRendererPlugin

Class MathRendererPlugin

Namespace: Aspose.TeX.Plugins
Assembly: Aspose.TeX.dll

MathRenderer プラグインクラス。
この例では、LaTeX 数式を PNG でレンダリングする方法を示します。

// MathRenderer を作成します。
MathRendererPlugin renderer = new MathRendererPlugin();
// PngMathRendererPluginOptions インスタンスを作成し、オプションを設定します。
PngMathRendererPluginOptions options = new PngMathRendererPluginOptions()
{
    BackgroundColor = Color.Yellow,
    TextColor = Color.Blue,
    Resolution = 150,
    Margin = 10,
    Preamble = "LaTeX preamble"
};
// ソース数式を追加します。
options.AddInputDataSource(new StringDataSource("LaTeX formula"));
// 画像を書き込むためのストリームを作成します。
using (Stream stream = File.Open("output path", FileMode.Create))
{
    // 出力ストリームを追加します。
    options.AddOutputDataTarget(new StreamDataSource(stream));
    // プロセスを実行します。
    ResultContainer result = renderer.Process(options);
}
public class MathRendererPlugin : IPlugin, IDisposable

継承

objectMathRendererPlugin

実装

IPlugin, IDisposable

継承されたメンバー

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

コンストラクター

MathRendererPlugin()

public MathRendererPlugin()

メソッド

Dispose()

このインスタンスを破棄します。

public void Dispose()

Process(IPluginOptions)

指定されたパラメーターで Math Renderer 処理を実行します。

public ResultContainer Process(IPluginOptions options)

パラメーター

options IPluginOptions

MathRenderer に対する指示を含むオプションオブジェクト。

戻り値

ResultContainer

操作の結果を含む ResultContainer オブジェクト。

例外

ArgumentException

指定されたオプションインスタンスが null であるか、不適切な型である場合、または入力/出力ソースのいずれかがサポートされていない型である場合。

 日本語