ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/x11raster.c
(Generate patch)

Comparing ray/src/px/x11raster.c (file contents):
Revision 1.3 by greg, Fri Mar 2 12:22:42 1990 UTC vs.
Revision 2.4 by greg, Tue May 19 14:22:50 1992 UTC

# Line 35 | Line 35 | int    bm_pad;
35                  if (!XMatchVisualInfo(disp,scrn,8,PseudoColor,&ourvinfo))
36                          return(NULL);
37          } else if (depth == 24) {
38 <                if (!XMatchVisualInfo(disp,scrn,24,TrueColor,&ourvinfo))
38 >                if (!XMatchVisualInfo(disp,scrn,24,TrueColor,&ourvinfo) &&
39 >                        !XMatchVisualInfo(disp,scrn,24,DirectColor,&ourvinfo))
40                          return(NULL);
41          } else
42                  return(NULL);
# Line 48 | Line 49 | int    bm_pad;
49                          depth==1 ? XYBitmap : ZPixmap,
50                          0,data,width,height,bm_pad,0);
51          xr->image->bitmap_bit_order = MSBFirst;
52 +        xr->image->byte_order = MSBFirst;
53 +        xr->image->red_mask = 0xff;
54 +        xr->image->green_mask = 0xff00;
55 +        xr->image->blue_mask = 0xff0000;
56 +        if (xr->image->bits_per_pixel == 32) {
57 +                xr->image->bytes_per_line = xr->image->bytes_per_line*24/32;
58 +                xr->image->bits_per_pixel = 24;
59 +                xr->image->bitmap_unit = 8;
60 +                while (xr->image->bytes_per_line % (bm_pad/8))
61 +                        xr->image->bytes_per_line++;
62 +        }
63          xr->gc = XCreateGC(disp, RootWindow(disp,scrn), 0, 0);
64          XSetState(disp, xr->gc, BlackPixel(disp,scrn), WhitePixel(disp,scrn),
65                          GXcopy, AllPlanes);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines