Class MathRendererPlugin
Class MathRendererPlugin
名称: Aspose.TeX.Plugins 集合: Aspose.TeX.dll (25.4.0)
MathRenderer 插件类。
// 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, IDisposableInheritance
Implements
继承人
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 对象。
Exceptions
如果指定选项例子是零或具有不适当的类型,或其中一个输入/输出源有未支持的类型。