VisualDetector 1.0.0.5

dotnet add package VisualDetector --version 1.0.0.5                
NuGet\Install-Package VisualDetector -Version 1.0.0.5                
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="VisualDetector" Version="1.0.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VisualDetector --version 1.0.0.5                
#r "nuget: VisualDetector, 1.0.0.5"                
#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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.5 379 7/24/2021
1.0.0.3 330 7/24/2021
1.0.0.2 298 7/23/2021
1.0.0.1 324 7/23/2021