简体   繁体   中英

xcb_shm_get_image equivalent in Xlib

I am currently porting a program from XCB to XLib*. Now I have a point where the image of the XServer gets grabbed via 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. Is there a way to achieve the same with XShmGetImage ?

*XCB has a Bug in the current debian stable rendering it useless for my needs.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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