get(wnd, x, y, xim->width, xim->height);
}
-void Image::get(Window wnd, int x, int y, int w, int h)
+void Image::get(Window wnd, int x, int y, int w, int h,
+ int dst_x, int dst_y)
{
- XGetSubImage(dpy, wnd, x, y, w, h, AllPlanes, ZPixmap, xim, 0, 0);
+ XGetSubImage(dpy, wnd, x, y, w, h, AllPlanes, ZPixmap, xim, dst_x, dst_y);
}
//
XShmGetImage(dpy, wnd, xim, x, y, AllPlanes);
}
-void ShmImage::get(Window wnd, int x, int y, int w, int h)
+void ShmImage::get(Window wnd, int x, int y, int w, int h,
+ int dst_x, int dst_y)
{
// FIXME: Use SHM for this as well?
- XGetSubImage(dpy, wnd, x, y, w, h, AllPlanes, ZPixmap, xim, 0, 0);
+ XGetSubImage(dpy, wnd, x, y, w, h, AllPlanes, ZPixmap, xim, dst_x, dst_y);
}
#ifdef HAVE_READDISPLAY
get(wnd, x, y, xim->width, xim->height);
}
-void IrixOverlayShmImage::get(Window wnd, int x, int y, int w, int h)
+void IrixOverlayShmImage::get(Window wnd, int x, int y, int w, int h,
+ int dst_x, int dst_y)
{
XRectangle rect;
unsigned long hints = XRD_TRANSPARENT | XRD_READ_POINTER;
rect.height = h;
XShmReadDisplayRects(dpy, wnd,
- &rect, 1, readDisplayBuf, -x, -y,
+ &rect, 1, readDisplayBuf,
+ dst_x - x, dst_y - y,
hints, &hints);
}
get(wnd, x, y, xim->width, xim->height);
}
-void SolarisOverlayImage::get(Window wnd, int x, int y, int w, int h)
+void SolarisOverlayImage::get(Window wnd, int x, int y, int w, int h,
+ int dst_x, int dst_y)
{
XImage *tmp_xim = XReadScreen(dpy, wnd, x, y, w, h, True);
if (tmp_xim == NULL)
return;
- updateRect(tmp_xim, 0, 0);
+ updateRect(tmp_xim, dst_x, dst_y);
XDestroyImage(tmp_xim);
}
}
virtual void get(Window wnd, int x = 0, int y = 0);
- virtual void get(Window wnd, int x, int y, int w, int h);
+ virtual void get(Window wnd, int x, int y, int w, int h,
+ int dst_x = 0, int dst_y = 0);
-// Copying pixels from one image to another.
+ // Copying pixels from one image to another.
virtual void updateRect(XImage *src, int dst_x = 0, int dst_y = 0);
virtual void updateRect(Image *src, int dst_x = 0, int dst_y = 0);
virtual void updateRect(XImage *src, int dst_x, int dst_y, int w, int h);
}
virtual void get(Window wnd, int x = 0, int y = 0);
- virtual void get(Window wnd, int x, int y, int w, int h);
+ virtual void get(Window wnd, int x, int y, int w, int h,
+ int dst_x = 0, int dst_y = 0);
protected:
}
virtual void get(Window wnd, int x = 0, int y = 0);
- virtual void get(Window wnd, int x, int y, int w, int h);
+ virtual void get(Window wnd, int x, int y, int w, int h,
+ int dst_x = 0, int dst_y = 0);
protected:
}
virtual void get(Window wnd, int x = 0, int y = 0);
- virtual void get(Window wnd, int x, int y, int w, int h);
+ virtual void get(Window wnd, int x, int y, int w, int h,
+ int dst_x = 0, int dst_y = 0);
protected: