/* Wolfram Gloger <u7y22ab@sunmail.lrz-muenchen.de>
I have implemented basic colormap support for the X11 versions of
/* Wolfram Gloger <u7y22ab@sunmail.lrz-muenchen.de>
I have implemented basic colormap support for the X11 versions of
allocate additional read-only color cells in the default colormap. In
general you will get arbitrary pixel values assigned to these new
cells and therefore I added a method wxColourMap::TransferBitmap()
allocate additional read-only color cells in the default colormap. In
general you will get arbitrary pixel values assigned to these new
cells and therefore I added a method wxColourMap::TransferBitmap()
IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxXPalette, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxPalette, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxXPalette, wxObject)
- for (node = m_palettes.First(); node; node = next) {
- wxXPalette *c = (wxXPalette *)node->Data();
+ for (node = m_palettes.GetFirst(); node; node = next) {
+ wxXPalette *c = (wxXPalette *)node->GetData();
unsigned long *pix_array = c->m_pix_array;
Colormap cmap = (Colormap) c->m_cmap;
bool destroyable = c->m_destroyable;
unsigned long *pix_array = c->m_pix_array;
Colormap cmap = (Colormap) c->m_cmap;
bool destroyable = c->m_destroyable;
// XFreeColors(display, cmap, pix_array, pix_array_n, 0);
// Be careful not to free '0' pixels...
int i, j;
// XFreeColors(display, cmap, pix_array, pix_array_n, 0);
// Be careful not to free '0' pixels...
int i, j;
if(j > i) XFreeColors(display, cmap, &pix_array[i], j-i, 0);
while(j<pix_array_n && pix_array[j]==0) j++;
}
if(j > i) XFreeColors(display, cmap, &pix_array[i], j-i, 0);
while(j<pix_array_n && pix_array[j]==0) j++;
}