简体   繁体   English

如何捕获桌面屏幕并在linux中的窗口中绘图

[英]How to capture desktop screen and draw in on window in linux

I am new to linux and i need port my windows program to linux and need help at the following. 我是linux的新手,我需要将我的windows程序移植到linux并在下面需要帮助。

  1. I need to capture the screen. 我需要捕捉屏幕。
  2. I need to create a window without borders and title which covers the whole screen. 我需要创建一个没有边框和标题的窗口,它覆盖整个屏幕。
  3. I need to draw the captures screen on that window. 我需要在该窗口上绘制捕获屏幕。
  4. I need to alpha blend a black picture over the window at XX% opacity. 我需要在XX%不透明度下在窗口上混合黑色图片。

All this was done easily with GetDC(NULL), BitBlt() and AlphaBlend() on windows. 所有这些都可以通过Windows上的GetDC(NULL),BitBlt()和AlphaBlend()轻松完成。

Linux looks very hard when coming to such simple programs to do. 在进行这样简单的程序时,Linux看起来非常困难。

For Linux; 对于Linux; you can always look at the source for scrot -- a small and simple screenshot program. 你总是可以看看scrot的源代码 - 一个小而简单的截图程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM