~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/GetImage.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        req->height = height;
74
74
        req->planeMask = plane_mask;
75
75
        req->format = format;
76
 
        
 
76
 
77
77
        if (_XReply (dpy, (xReply *) &rep, 0, xFalse) == 0 ||
78
78
            rep.length == 0) {
79
79
                UnlockDisplay(dpy);
80
80
                SyncHandle();
81
81
                return (XImage *)NULL;
82
82
        }
83
 
                
 
83
 
84
84
        nbytes = (long)rep.length << 2;
85
85
        data = (char *) Xmalloc((unsigned) nbytes);
86
86
        if (! data) {
117
117
     unsigned long plane_mask,
118
118
     int format,        /* either XYPixmap or ZPixmap */
119
119
     XImage *dest_image,
120
 
     int dest_x, 
 
120
     int dest_x,
121
121
     int dest_y)
122
122
{
123
123
        XImage *temp_image;
124
 
        temp_image = XGetImage(dpy, d, x, y, width, height, 
 
124
        temp_image = XGetImage(dpy, d, x, y, width, height,
125
125
                                plane_mask, format);
126
126
        if (!temp_image)
127
127
            return (XImage *)NULL;
128
128
        _XSetImage(temp_image, dest_image, dest_x, dest_y);
129
129
        XDestroyImage(temp_image);
130
130
        return (dest_image);
131
 
}       
 
131
}