comparison src/glyphs-x.c @ 243:f220cc83d72e r20-5b20

Import from CVS: tag r20-5b20
author cvs
date Mon, 13 Aug 2007 10:17:07 +0200
parents 557eaa0339bf
children 677f6a0ee643
comparison
equal deleted inserted replaced
242:fc816b73a05f 243:f220cc83d72e
1916 */ 1916 */
1917 { 1917 {
1918 int i,j,x,b; 1918 int i,j,x,b;
1919 unsigned int bytes_per_pixel, scanline_pad; 1919 unsigned int bytes_per_pixel, scanline_pad;
1920 unsigned long pixval; 1920 unsigned long pixval;
1921 unsigned char *q, pixar[3]; 1921 unsigned char *q, *pixar;
1922 RunlengthPacket *p; 1922 RunlengthPacket *p;
1923 1923
1924 q = (unsigned char *) unwind.ximage->data; 1924 q = (unsigned char *) unwind.ximage->data;
1925 x = 0; 1925 x = 0;
1926 p = unwind.image->pixels; 1926 p = unwind.image->pixels;
1927 scanline_pad = unwind.ximage->bytes_per_line - 1927 scanline_pad = unwind.ximage->bytes_per_line -
1928 ((unwind.ximage->width * unwind.ximage->bits_per_pixel) >> 3); 1928 ((unwind.ximage->width * unwind.ximage->bits_per_pixel) >> 3);
1929 1929
1930 /* Convert to multi-byte color-mapped X image. */ 1930 /* Convert to multi-byte color-mapped X image. */
1931 bytes_per_pixel=unwind.ximage->bits_per_pixel >> 3; 1931 bytes_per_pixel=unwind.ximage->bits_per_pixel >> 3;
1932
1933 pixar = (unsigned char *) alloca (bytes_per_pixel);
1932 1934
1933 for (i=0; i < unwind.image->packets; i++) { 1935 for (i=0; i < unwind.image->packets; i++) {
1934 if (unwind.image->class == PseudoClass) 1936 if (unwind.image->class == PseudoClass)
1935 pixval = unwind.pixels[p->index]; 1937 pixval = unwind.pixels[p->index];
1936 else 1938 else