English 中文(简体)
linux中windows gdi区域的等价物
原标题:Equivalent of windows gdi regions in linux

我有时会使用windows gdi区域进行图形绘制和无效/验证。例如程序http://www.maxerist.net/main/soft-for-win/tubicus(oss)只使用区域(没有位图或屏幕外缓冲区)。该绘图使用FillRgn和FrameRgn进行,使用InvalidateRgn和CombineRgn进行无效和绘制,每个单元格(见屏幕截图)都是使用CreateEllipticRgn、CreatePolygonRgn和comineRgn创建的简单区域。

我计划将它移植到Linux。据我所知,Linux中有许多图形库。是否有支持类似窗口的区域?

谢谢

问题回答

您想要使用X窗口系统,也就是X11,作为您的图形平台。它的客户端库称为Xlib。平台支持多边形区域。

有许多库是在Xlib之上编写的(Gtk、Qt、wxWindows等),但您总是可以将低级Xlib API直接用于其中任何一个库。Qt甚至支持椭圆区域。我不知道细节,但我想它是在X11多边形区域之上实现的。

Qt有很多绘画选项,使用QPainterQPainterPath对象可能非常适合您。(Qt分布中有示例)。您可以组合(添加/相交/子行为)路径。

QGraphicsView框架也是一个不错的选择。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签