comparison src/glyphs-x.c @ 333:4f79e16b1112 r21-0-64

Import from CVS: tag r21-0-64
author cvs
date Mon, 13 Aug 2007 10:49:50 +0200
parents 33bdb3d4b97f
children 4711e16a8e49
comparison
equal deleted inserted replaced
332:bb75ebac9531 333:4f79e16b1112
142 } 142 }
143 143
144 bitmap_pad = ((depth > 16) ? 32 : 144 bitmap_pad = ((depth > 16) ? 32 :
145 (depth > 8) ? 16 : 145 (depth > 8) ? 16 :
146 8); 146 8);
147 byte_cnt = bitmap_pad >> 3;
148 147
149 outimg = XCreateImage (dpy, vis, 148 outimg = XCreateImage (dpy, vis,
150 depth, ZPixmap, 0, 0, width, height, 149 depth, ZPixmap, 0, 0, width, height,
151 bitmap_pad, 0); 150 bitmap_pad, 0);
152 if (!outimg) return NULL; 151 if (!outimg) return NULL;
152
153 byte_cnt = outimg->bits_per_pixel >> 3;
153 154
154 data = (unsigned char *) xmalloc (outimg->bytes_per_line * height); 155 data = (unsigned char *) xmalloc (outimg->bytes_per_line * height);
155 if (!data) 156 if (!data)
156 { 157 {
157 XDestroyImage (outimg); 158 XDestroyImage (outimg);