Class FigureRendererPlugin
Class FigureRendererPlugin
Namespace: Aspose.TeX.Plugins
Assembly: Aspose.TeX.dll
کلاس پلاگین Figure Renderer.
این مثال نشان میدهد که چگونه یک قطعه LaTeX را در PNG رندر کنیم.
// Create the Figure Renderer.
FigureRendererPlugin renderer = new FigureRendererPlugin();
// Create the PngFigureRendererPluginOptions instance and set up options.
PngFigureRendererPluginOptions options = new PngFigureRendererPluginOptions()
{
BackgroundColor = Color.Yellow,
Resolution = 150,
Margin = 10,
Preamble = "LaTeX preamble"
};
// Add an input LaTeX fragment.
options.AddInputDataSource(new StringDataSource("LaTeX fragment"));
// 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);
}
public class FigureRendererPlugin : IPlugin, IDisposable
وراثت
پیادهسازیها
اعضای ارثبرده
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
سازندهها
FigureRendererPlugin()
public FigureRendererPlugin()
متدها
Dispose()
این نمونه را آزاد میکند.
public void Dispose()
Process(IPluginOptions)
پردازش Figure Renderer را با پارامترهای مشخص شده اجرا میکند.
public ResultContainer Process(IPluginOptions options)
پارامترها
options
IPluginOptions
یک شیء گزینه که شامل دستورالعملهایی برای FigureRenderer است.
بازگشت
یک شیء ResultContainer که شامل نتیجه عملیات است.
استثناها
زمانی که نمونه گزینه داده شده null یا نوع نامناسبی دارد،
یا یکی از منابع ورودی/خروجی نوع پشتیبانی نشدهای دارد.