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 2.3 by greg, Tue May 19 13:10:07 1992 UTC vs.
Revision 2.4 by greg, Tue May 19 14:22:50 1992 UTC

# Line 48 | Line 48 | int    bm_pad;
48          xr->image = XCreateImage(disp,ourvinfo.visual,depth,
49                          depth==1 ? XYBitmap : ZPixmap,
50                          0,data,width,height,bm_pad,0);
51 <        if (depth == 1) {
52 <                xr->image->bitmap_bit_order = MSBFirst;
53 <                xr->image->byte_order = MSBFirst;
54 <        } else
55 <                xr->image->byte_order = LSBFirst;
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),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines