如何调整与XLIB一个像素图? [英] How to resize a pixmap with XLib?
本文介绍了如何调整与XLIB一个像素图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为了下恢复它公开事件正在使用像素映射为窗口的备份。当窗口大小,我必须调整备份像素图?
I'm using a pixmap as a window's backup in order to restore it under expose events. When the window is resized, must I resize the backup pixmap?
如果是这样,什么是最好的方式?与新的大小创建一个新的像素图?
If so, what is the best way? Create a new pixmap with the new size?
推荐答案
是的,你是对的。
如果窗口调整为一个更小的尺寸,你只是剪辑了。
If the window is resized to a smaller size you just clip it.
如果该窗口是更大的再次分配给新的大小。
If the window is bigger you allocate again to the new size.
我的建议也将是看看
- xcb which replaces xlib at the moment
- xshm functions for faster performance
- Xrender/cairo/clutter that may do what you want already
这篇关于如何调整与XLIB一个像素图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文