简体   繁体   English

Xlib 中的 xcb_shm_get_image 等效项

[英]xcb_shm_get_image equivalent in Xlib

I am currently porting a program from XCB to XLib*.我目前正在将程序从 XCB 移植到 XLib*。 Now I have a point where the image of the XServer gets grabbed via xcb_shm_get_image .现在我知道 XServer 的图像通过xcb_shm_get_image被抓取。 xcb_shm_get_image has the option in defining what portions of the image you want to grab, given x and y , width and height parameters. xcb_shm_get_image可以选择定义要抓取的图像部分,给定xywidthheight参数。 Is there a way to achieve the same with XShmGetImage ?有没有办法用XShmGetImage实现同样的XShmGetImage

*XCB has a Bug in the current debian stable rendering it useless for my needs. *XCB 在当前的 debian 稳定版中有一个错误,使其无法满足我的需求。

Bool XShmGetImage(
    register Display *dpy,
    Drawable d,
    XImage *image,
    int x, int y,
    unsigned long plane_mask);

With XShmGetImage() you specify x & y as arguments to the function, and the height and width are taken from the image you pass as the destination to copy the pixels into.使用XShmGetImage()指定x & y作为函数的参数,高度宽度取自作为目标传递的图像以将像素复制到其中。

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

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