From: Geoffrey F. <fu...@us...> - 2001-01-05 00:25:19
|
Update of /cvsroot/plplot/plplot/drivers In directory usw-pr-cvs1:/tmp/cvs-serv20388/drivers Modified Files: xwin.c Log Message: Hacked upon the code which allocates cmap0. If we're using read-only color map, don't give up so easily when a color alloc request fails. Previously, as soon as we got the first color alloc failure, we quit trying, leaving subsequent colors unallocated. Now when a color alloc fails when referenced by pixel, we try again using XAllocNamedColor. If this fails, we fall back to asking for a white pixel. This prescription lets us fill the cmap0 with colors. Most will be as requested, but in the event that some color can't be allocated--either by pixel val, or by name--we at least stuff that cmap0 entry with white, which means at least something gets drawn. Previously such situations would result in a blank color, which besides being invisible, could also erase previously plotted info, causing much distress. Basically, it works better now than it did, but still doesn't deal as gracefully with tight color map situations as one might hope. |