/[xforms]/xforms/image/image_disp.c
ViewVC logotype

Diff of /xforms/image/image_disp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by leeming, Thu Apr 24 09:35:34 2003 UTC revision 1.4 by leeming, Tue Sep 9 00:28:25 2003 UTC
# Line 29  Line 29 
29   *  All rights reserved.   *  All rights reserved.
30   *.   *.
31   *   *
32   * Image display.   * Image display.
33   *   *
34   */   */
35    
# Line 723  flimage_color_to_pixel(FL_IMAGE * im, in Line 723  flimage_color_to_pixel(FL_IMAGE * im, in
723          max_col = FL_min(256, (1 << im->depth));          max_col = FL_min(256, (1 << im->depth));
724          if (!xcolor)          if (!xcolor)
725              xcolor = fl_malloc(256 * sizeof(*xcolor));              xcolor = fl_malloc(256 * sizeof(*xcolor));
726          /*          /*
727           * not theoretically correct as colormap may have changed           * not theoretically correct as colormap may have changed
728           * since the last time we asked for colors. Take a chance for           * since the last time we asked for colors. Take a chance for
729           * performace.           * performace.
730           */           */
731          if (lastcolormap != im->xcolormap)          if (lastcolormap != im->xcolormap)
732          {          {
# Line 816  adapt_image_to_window(FL_IMAGE *im, XWin Line 816  adapt_image_to_window(FL_IMAGE *im, XWin
816       fl_rgbmask_to_shifts(rgb2p->rmask, &rgb2p->rshift, &rgb2p->rbits);       fl_rgbmask_to_shifts(rgb2p->rmask, &rgb2p->rshift, &rgb2p->rbits);
817       fl_rgbmask_to_shifts(rgb2p->gmask, &rgb2p->gshift, &rgb2p->gbits);       fl_rgbmask_to_shifts(rgb2p->gmask, &rgb2p->gshift, &rgb2p->gbits);
818       fl_rgbmask_to_shifts(rgb2p->bmask, &rgb2p->bshift, &rgb2p->bbits);       fl_rgbmask_to_shifts(rgb2p->bmask, &rgb2p->bshift, &rgb2p->bbits);
819  }      }
820    
821  #define Compatible(x,im)                                               \  #define Compatible(x,im)                                               \
822       (x.depth==im->depth                        &&                     \       (x.depth==im->depth                        &&                     \
# Line 1122  do_quantization(FL_IMAGE * im, Colormap Line 1122  do_quantization(FL_IMAGE * im, Colormap
1122                                 im->red_lut, im->green_lut, im->blue_lut,                                 im->red_lut, im->green_lut, im->blue_lut,
1123                                 im->map_len, &empty_slots);                                 im->map_len, &empty_slots);
1124    
1125          /* It's better to take a chance of finding similar colors in the          /* It's better to take a chance of finding similar colors in the
1126             colormap than reducing the number of colors too much */             colormap than reducing the number of colors too much */
1127          done = (empty_slots == im->map_len) ||          done = (empty_slots == im->map_len) ||
1128              (empty_slots < 12 || empty_slots < maxcol / 4);              (empty_slots < 12 || empty_slots < maxcol / 4);
# Line 1381  flimage_from_pixmap_(FL_IMAGE * im, Pixm Line 1381  flimage_from_pixmap_(FL_IMAGE * im, Pixm
1381          unsigned int ww, hh, bjunk, djunk;          unsigned int ww, hh, bjunk, djunk;
1382          int xx, yy;          int xx, yy;
1383          Window root;          Window root;
1384          XGetGeometry(im->xdisplay, pixmap, &root, &xx, &yy, &ww, &hh,          XGetGeometry(im->xdisplay, pixmap, &root, &xx, &yy, &ww, &hh,
1385                      &bjunk, &djunk);                      &bjunk, &djunk);
1386          w = ww;          w = ww;
1387          h = hh;          h = hh;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26