| 41 |
|
xr->image = XCreateImage(disp,vis->visual,vis->depth, |
| 42 |
|
ZPixmap,0,data,width,height,bm_pad,0); |
| 43 |
|
xr->image->bitmap_bit_order = MSBFirst; |
| 44 |
+ |
xr->image->bitmap_unit = bm_pad; |
| 45 |
|
xr->image->byte_order = *(char *)&swaptest ? LSBFirst : MSBFirst; |
| 46 |
|
if (vis->depth >= 24 && (xr->image->red_mask != 0xff || |
| 47 |
|
xr->image->green_mask != 0xff00 || |
| 66 |
|
register unsigned char *p; |
| 67 |
|
register int i; |
| 68 |
|
|
| 69 |
< |
if (xr->image->depth != 8 || xr->ncolors != 0) |
| 69 |
> |
if (xr->image->depth > 8 || xr->ncolors != 0) |
| 70 |
|
return(xr->ncolors); |
| 71 |
|
xr->pmap = (short *)malloc(256*sizeof(short)); |
| 72 |
|
if (xr->pmap == NULL) |
| 147 |
|
register int i; |
| 148 |
|
register unsigned char *p; |
| 149 |
|
|
| 150 |
< |
if (xr->ncolors == 0 || xr->image->depth != 8) |
| 150 |
> |
if (xr->ncolors == 0 || xr->image->depth > 8) |
| 151 |
|
return(NULL); |
| 152 |
|
if (xr->pixels != NULL) |
| 153 |
|
return(xr->pixels); |
| 190 |
|
|
| 191 |
|
|
| 192 |
|
Pixmap |
| 193 |
< |
make_rpixmap(xr, d) /* make pixmap for raster */ |
| 193 |
> |
make_rpixmap(xr, w) /* make pixmap for raster */ |
| 194 |
|
register XRASTER *xr; |
| 195 |
< |
Drawable d; |
| 195 |
> |
Window w; |
| 196 |
|
{ |
| 197 |
+ |
XWindowAttributes xwattr; |
| 198 |
|
Pixmap pm; |
| 199 |
|
|
| 200 |
|
if (xr->pm != 0) |
| 201 |
|
return(xr->pm); |
| 202 |
< |
pm = XCreatePixmap(xr->disp, d, |
| 202 |
> |
XGetWindowAttributes(xr->disp, w, &xwattr); |
| 203 |
> |
pm = XCreatePixmap(xr->disp, w, |
| 204 |
|
xr->image->width, xr->image->height, |
| 205 |
< |
xr->image->depth); |
| 205 |
> |
xwattr.depth); |
| 206 |
|
if (pm == 0) |
| 207 |
|
return(0); |
| 208 |
|
put_raster(pm, 0, 0, xr); |