NScript.Plot
7.0.2
dotnet add package NScript.Plot --version 7.0.2
NuGet\Install-Package NScript.Plot -Version 7.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NScript.Plot" Version="7.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NScript.Plot --version 7.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NScript.Plot, 7.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NScript.Plot as a Cake Addin #addin nuget:?package=NScript.Plot&version=7.0.2 // Install NScript.Plot as a Cake Tool #tool nuget:?package=NScript.Plot&version=7.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NScript.Plot
NScript.Plot 基于 Avalonia,提供一系列 plot 服务,方便进行内容展示。当前版本只支持图像和视频/序列图像的展示。 using NScript.Plot
后,对于下属类型的实例,可以直接通过 Show
扩展方法来显示内容:
- [SkiaSharp] SKBitmap
- [SkiaSharp] Func<SKBitmap>
- [SkiaSharp] IEnumerable<SKBitmap>
- [Geb.Image] ImageBgr24
- [Geb.Image] ImageBgra32
- [Geb.Image] Func<ImageBgr24>
- [Geb.Image] Func<ImageBgra32>
- [Geb.Image] IEnumerable<ImageBgr24>
- [Geb.Image] IEnumerable<ImageBgra32>
对于 Func<T> 类型的实例,当返回 null 时,停止显示序列图像。
示例代码:
(1) 显示图像:
var img = new ImageBgr24(200, 200).Fill(Bgr24.RED);
img.Show("红色图像");
(2)显示视频
var file = "D:\\test\\派蒙生气成长史.mp4";
Geb.Media.IO.VideoFile.ForEach(file).Show("演示视频");
(3)显示视频,但显示前对图像进行处理
var file = "D:\\test\\派蒙生气成长史.mp4";
Geb.Media.IO.VideoFile.ForEach(file, 0.1f, (float time, float duration, ImageBgr24 img) =>
{
// 在画面上打印当前帧时间
img.DrawText($"{time.ToString("0.00")}/{duration.ToString("0.00")} s", Bgr24.WHITE, new PointS(10, 2));
}).Show("演示视频");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- Avalonia (>= 11.0.6)
- Avalonia.Desktop (>= 11.0.6)
- Avalonia.Themes.Fluent (>= 11.0.6)
- Geb.Image (>= 6.0.8)
- SkiaImageView.Avalonia11 (>= 1.5.0)
- SkiaSharp (>= 2.88.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.