/
shmachilin
/
MathCore
Обзор
Документация
Войти
/
shmachilin
/
MathCore
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Tests/ConsoleTest/Extensions/PlotModelEx.cs
18 строк
638 B
Infarh
0.0.62 - IProgressControl - объект контроля за асинхронной операцией
13 фев 2022, 15:29
13 фев 2022, 15:29
b735943
Код
Авторство
О чём код?
using OxyPlot; using OxyPlot.ImageSharp; namespace ConsoleTest.Extensions; internal static class PlotModelEx { public static FileInfo ToPNG(this IPlotModel Model, string FilePath, int Width = 800, int Height = 600, double Resolution = 96) => Model.ToPNG(new FileInfo(FilePath), Width, Height, Resolution); public static FileInfo ToPNG(this IPlotModel Model, FileInfo File, int Width = 800, int Height = 600, double Resolution = 96) { var exporter = new PngExporter(Width, Height, Resolution); using var stream = File.Create(); exporter.Export(Model, stream); return File; } }