VisualDetector 1.0.0.5
dotnet add package VisualDetector --version 1.0.0.5
NuGet\Install-Package VisualDetector -Version 1.0.0.5
<PackageReference Include="VisualDetector" Version="1.0.0.5" />
paket add VisualDetector --version 1.0.0.5
#r "nuget: VisualDetector, 1.0.0.5"
// Install VisualDetector as a Cake Addin #addin nuget:?package=VisualDetector&version=1.0.0.5 // Install VisualDetector as a Cake Tool #tool nuget:?package=VisualDetector&version=1.0.0.5
DisplaySharp
Minimal display lib for C# based on libdrm
基于libdrm的精简C#图形库
What is this 是什么
This is a graphic lib for C# to do basic graphic things, like drawing rectangles or display a Bitmap on screen.
这是为C#设计的基础图形库,比如说可以绘制矩形,或是将一张Bitmap显示在屏幕上。
Setup 安装
First, you should install libdrm (and ofcource dotnet5 runtime) on your linux system:
首先,在你的linux系统中安装libdrm(当然也要安装dotnet环境):
apt install libdrm-dev
Then make sure you have your build tools:
然后确保你安装了构建工具:
apt install make gcc
For using Bitmap related features, you also need libgdiplus:
要使用Bitmap相关功能,你还需要libgdiplus:
apt install libgdiplus
You have git installed, don't you? 你应该装了git对吧?
Clone the native part of the lib , build and install it:
克隆本项目的native部分,构建并安装它:
git clone https://github.com/MicrostormSoft/DisplaySharp-Native.git
cd DisplaySharp-Native
make
make install
Then just import the nuget package of this repo into your dotnet project. Done.
然后把这个项目的nuget包导入到你的.net项目里,就完成了。
How to use 如何使用
static void Main(string[] args)
{
var c = new Canvas("/dev/dri/card0");//open your display device
Bitmap bm = (Bitmap)Bitmap.FromFile("test.png");//read a picture as bitmap
c.DrawBitmap(bm);//draw it onto the screen
c.DrawRectangle(new Rectangle(100, 100, 50, 50), Color.Blue, fill: false);//draw a rectangle wire frame at Point(100,100) Size(50,50) in blue
Console.ReadLine();
c.Clear(Color.White);//clear the screen
Console.ReadLine();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
-
net5.0
- OpenCvSharp4 (>= 4.5.2.20210404)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.