comparison src/image.c @ 66924:53960d1c1f2f

initialize XpmAttributes
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 16 Nov 2005 13:38:25 +0000
parents a9d1837b115c
children 9d0a2cc054be
comparison
equal deleted inserted replaced
66923:830bec4c85bb 66924:53960d1c1f2f
3727 XpmAttributes attrs; 3727 XpmAttributes attrs;
3728 Pixmap bitmap, mask; 3728 Pixmap bitmap, mask;
3729 3729
3730 bzero (&attrs, sizeof attrs); 3730 bzero (&attrs, sizeof attrs);
3731 3731
3732 attrs.visual = FRAME_X_VISUAL (f);
3733 attrs.colormap = FRAME_X_COLORMAP (f);
3734 attrs.valuemask |= XpmVisual;
3735 attrs.valuemask |= XpmColormap;
3736
3732 rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 3737 rc = XpmCreatePixmapFromData (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
3733 bits, &bitmap, &mask, &attrs); 3738 bits, &bitmap, &mask, &attrs);
3734 if (rc != XpmSuccess) 3739 if (rc != XpmSuccess)
3735 return -1; 3740 return -1;
3736 3741
3795 #else /* not XpmAllocCloseColors */ 3800 #else /* not XpmAllocCloseColors */
3796 attrs.closeness = 600; 3801 attrs.closeness = 600;
3797 attrs.valuemask |= XpmCloseness; 3802 attrs.valuemask |= XpmCloseness;
3798 #endif /* not XpmAllocCloseColors */ 3803 #endif /* not XpmAllocCloseColors */
3799 #endif /* ALLOC_XPM_COLORS */ 3804 #endif /* ALLOC_XPM_COLORS */
3805 #ifdef ALLOC_XPM_COLORS
3806 xpm_init_color_cache (f, &attrs);
3807 #endif
3800 3808
3801 /* If image specification contains symbolic color definitions, add 3809 /* If image specification contains symbolic color definitions, add
3802 these to `attrs'. */ 3810 these to `attrs'. */
3803 color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL); 3811 color_symbols = image_spec_value (img->spec, QCcolor_symbols, NULL);
3804 if (CONSP (color_symbols)) 3812 if (CONSP (color_symbols))