Renameing funktions from DIB to prevent name clashes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (JL)
1999-10-04 11:40:50 +00:00
parent a61ddc4715
commit ef3ab00998
6 changed files with 54 additions and 56 deletions

View File

@@ -221,7 +221,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat,
wxBitmap *bitmap = (wxBitmap *)data; wxBitmap *bitmap = (wxBitmap *)data;
HBITMAP hBitmap = (HBITMAP)bitmap->GetHBITMAP(); HBITMAP hBitmap = (HBITMAP)bitmap->GetHBITMAP();
// NULL palette means to use the system one // NULL palette means to use the system one
HANDLE hDIB = BitmapToDIB(hBitmap, (HPALETTE)NULL); HANDLE hDIB = wxBitmapToDIB(hBitmap, (HPALETTE)NULL);
handle = SetClipboardData(CF_DIB, hDIB); handle = SetClipboardData(CF_DIB, hDIB);
#endif #endif
break; break;

View File

@@ -113,7 +113,7 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
#if wxUSE_RESOURCE_LOADING_IN_MSW #if wxUSE_RESOURCE_LOADING_IN_MSW
HBITMAP hBitmap = 0; HBITMAP hBitmap = 0;
HPALETTE hPalette = 0; HPALETTE hPalette = 0;
bool success = ReadDIB(WXSTRINGCAST cursor_file, &hBitmap, &hPalette) != 0; bool success = wxReadDIB(WXSTRINGCAST cursor_file, &hBitmap, &hPalette) != 0;
if (!success) if (!success)
return; return;
if (hPalette) if (hPalette)

View File

@@ -6,7 +6,7 @@
* * * *
* FUNCTIONS : * * FUNCTIONS : *
* * * *
* ReadDIB() - Reads a DIB * * wxReadDIB() - Reads a DIB *
* * * *
* WriteDIB() - Writes a global handle in CF_DIB format* * WriteDIB() - Writes a global handle in CF_DIB format*
* to a file. * * to a file. *
@@ -91,8 +91,6 @@ WORD PaletteSize (VOID FAR * pv);
WORD DibNumColors (VOID FAR * pv); WORD DibNumColors (VOID FAR * pv);
// HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal); // HANDLE DibFromBitmap (HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal);
BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *); BOOL PASCAL MakeBitmapAndPalette(HDC,HANDLE,HPALETTE *,HBITMAP *);
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER);
BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
/**************************************************************************** /****************************************************************************
* * * *
@@ -105,7 +103,7 @@ BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette);
* * * *
****************************************************************************/ ****************************************************************************/
BOOL WriteDIB(LPTSTR szFile, HANDLE hdib) static BOOL WriteDIB(LPTSTR szFile, HANDLE hdib)
{ {
BITMAPFILEHEADER hdr; BITMAPFILEHEADER hdr;
LPBITMAPINFOHEADER lpbi; LPBITMAPINFOHEADER lpbi;
@@ -156,7 +154,7 @@ BOOL WriteDIB(LPTSTR szFile, HANDLE hdib)
* * * *
****************************************************************************/ ****************************************************************************/
WORD PaletteSize(VOID FAR * pv) static WORD PaletteSize(VOID FAR * pv)
{ {
LPBITMAPINFOHEADER lpbi; LPBITMAPINFOHEADER lpbi;
WORD NumColors; WORD NumColors;
@@ -181,7 +179,7 @@ WORD PaletteSize(VOID FAR * pv)
* * * *
****************************************************************************/ ****************************************************************************/
WORD DibNumColors(VOID FAR *pv) static WORD DibNumColors(VOID FAR *pv)
{ {
int bits; int bits;
BITMAPINFOHEADER *lpbi; BITMAPINFOHEADER *lpbi;
@@ -228,7 +226,7 @@ WORD DibNumColors(VOID FAR *pv)
****************************************************************************/ ****************************************************************************/
#if NOTHING #if NOTHING
HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal) static HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
{ {
BITMAP bm; BITMAP bm;
BITMAPINFOHEADER bi; BITMAPINFOHEADER bi;
@@ -356,7 +354,7 @@ HANDLE DibFromBitmap(HBITMAP hbm, DWORD biStyle, WORD biBits, HPALETTE hpal)
* * * *
****************************************************************************/ ****************************************************************************/
DWORD PASCAL lread(int fh, void far *pv, DWORD ul) static DWORD PASCAL lread(int fh, void far *pv, DWORD ul)
{ {
DWORD ulT = ul; DWORD ulT = ul;
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__) #if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
@@ -386,7 +384,7 @@ DWORD PASCAL lread(int fh, void far *pv, DWORD ul)
* * * *
****************************************************************************/ ****************************************************************************/
DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul) static DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul)
{ {
DWORD ulT = ul; DWORD ulT = ul;
#if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__) #if defined(WINNT) || defined(__WIN32__) || defined(__WIN32__) || defined(__WXWINE__)
@@ -420,7 +418,7 @@ DWORD PASCAL lwrite(int fh, VOID FAR *pv, DWORD ul)
* FALSE - otherwise * FALSE - otherwise
* *
****************************************************************************/ ****************************************************************************/
BOOL ReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette) BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
{ {
int fh; int fh;
LPBITMAPINFOHEADER lpbi; LPBITMAPINFOHEADER lpbi;
@@ -588,7 +586,7 @@ ErrExit2:
* not valid * not valid
* *
****************************************************************************/ ****************************************************************************/
BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB, static BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
HPALETTE * phPal, HBITMAP * phBitmap) HPALETTE * phPal, HBITMAP * phBitmap)
{ {
LPBITMAPINFOHEADER lpInfo; LPBITMAPINFOHEADER lpInfo;
@@ -603,7 +601,7 @@ BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
lpInfo = (LPBITMAPINFOHEADER) GlobalLock(hDIB); lpInfo = (LPBITMAPINFOHEADER) GlobalLock(hDIB);
#endif #endif
hPalette = MakeDIBPalette(lpInfo); hPalette = wxMakeDIBPalette(lpInfo);
if ( hPalette ) if ( hPalette )
{ {
// Need to realize palette for converting DIB to bitmap. // Need to realize palette for converting DIB to bitmap.
@@ -632,7 +630,7 @@ BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
/**************************************************************************** /****************************************************************************
* * * *
* FUNCTION : MakeDIBPalette(lpInfo) * * FUNCTION : wxMakeDIBPalette(lpInfo) *
* * * *
* PURPOSE : Given a BITMAPINFOHEADER, create a palette based on * PURPOSE : Given a BITMAPINFOHEADER, create a palette based on
* the color table. * the color table.
@@ -642,7 +640,7 @@ BOOL PASCAL MakeBitmapAndPalette(HDC hDC, HANDLE hDIB,
* zero - unable to create palette * zero - unable to create palette
* * * *
****************************************************************************/ ****************************************************************************/
HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo) HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
{ {
#ifdef __WXWINE__ #ifdef __WXWINE__
return (FALSE); return (FALSE);
@@ -703,7 +701,7 @@ bool wxLoadIntoBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette **pal)
HBITMAP hBitmap; HBITMAP hBitmap;
HPALETTE hPalette; HPALETTE hPalette;
bool success = (ReadDIB(filename, &hBitmap, &hPalette) != 0); bool success = (wxReadDIB(filename, &hBitmap, &hPalette) != 0);
if (!success) if (!success)
{ {
@@ -782,7 +780,7 @@ wxBitmap *wxLoadBitmap(wxChar *filename, wxPalette **pal)
// //
//--------------------------------------------------------------------- //---------------------------------------------------------------------
void InitBitmapInfoHeader (LPBITMAPINFOHEADER lpBmInfoHdr, static void InitBitmapInfoHeader (LPBITMAPINFOHEADER lpBmInfoHdr,
DWORD dwWidth, DWORD dwWidth,
DWORD dwHeight, DWORD dwHeight,
int nBPP) int nBPP)
@@ -815,7 +813,7 @@ void InitBitmapInfoHeader (LPBITMAPINFOHEADER lpBmInfoHdr,
LPSTR FindDIBBits (LPSTR lpbi) LPSTR wxFindDIBBits (LPSTR lpbi)
{ {
return (lpbi + *(LPDWORD)lpbi + PaletteSize (lpbi)); return (lpbi + *(LPDWORD)lpbi + PaletteSize (lpbi));
} }
@@ -840,7 +838,7 @@ LPSTR FindDIBBits (LPSTR lpbi)
// //
//--------------------------------------------------------------------- //---------------------------------------------------------------------
HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal) HANDLE wxBitmapToDIB (HBITMAP hBitmap, HPALETTE hPal)
{ {
BITMAP Bitmap; BITMAP Bitmap;
BITMAPINFOHEADER bmInfoHdr; BITMAPINFOHEADER bmInfoHdr;
@@ -882,7 +880,7 @@ HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal)
#endif #endif
*lpbmInfoHdr = bmInfoHdr; *lpbmInfoHdr = bmInfoHdr;
lpBits = FindDIBBits ((LPSTR) lpbmInfoHdr); lpBits = wxFindDIBBits ((LPSTR) lpbmInfoHdr);
// Now, we need a DC to hold our bitmap. If the app passed us // Now, we need a DC to hold our bitmap. If the app passed us
@@ -934,7 +932,7 @@ bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxPalette *colourmap)
if (colourmap) if (colourmap)
hPalette = (HPALETTE) colourmap->GetHPALETTE(); hPalette = (HPALETTE) colourmap->GetHPALETTE();
HANDLE dibHandle = BitmapToDIB((HBITMAP) bitmap->GetHBITMAP(), hPalette); HANDLE dibHandle = wxBitmapToDIB((HBITMAP) bitmap->GetHBITMAP(), hPalette);
if (dibHandle) if (dibHandle)
{ {
bool success = (WriteDIB(filename, dibHandle) != 0); bool success = (WriteDIB(filename, dibHandle) != 0);

View File

@@ -82,7 +82,7 @@
* mapping for fast performance. * mapping for fast performance.
*/ */
void ClearSystemPalette(void) void wxClearSystemPalette(void)
{ {
//*** A dummy palette setup //*** A dummy palette setup
struct struct
@@ -146,7 +146,7 @@ void ClearSystemPalette(void)
* bits.... * bits....
*/ */
int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi) int wxDibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
{ {
HFILE fh; HFILE fh;
OFSTRUCT of; OFSTRUCT of;
@@ -158,7 +158,7 @@ int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
return 0; return 0;
} }
long size = DibSize(lpbi); long size = wxDibSize(lpbi);
// write file header // write file header
BITMAPFILEHEADER bmf; BITMAPFILEHEADER bmf;
@@ -166,7 +166,7 @@ int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
bmf.bfSize = sizeof(bmf) + size; bmf.bfSize = sizeof(bmf) + size;
bmf.bfReserved1 = 0; bmf.bfReserved1 = 0;
bmf.bfReserved2 = 0; bmf.bfReserved2 = 0;
bmf.bfOffBits = sizeof(bmf) + (char FAR*)(DibPtr(lpbi)) - (char FAR*)lpbi; bmf.bfOffBits = sizeof(bmf) + (char FAR*)(wxDibPtr(lpbi)) - (char FAR*)lpbi;
#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS) #if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__) || defined(wxUSE_NORLANDER_HEADERS)
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 || if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
_hwrite(fh, (LPCSTR)lpbi, size)<0) { _hwrite(fh, (LPCSTR)lpbi, size)<0) {
@@ -187,7 +187,7 @@ int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
return 1; return 1;
} }
PDIB DibOpenFile(LPTSTR szFile) PDIB wxDibOpenFile(LPTSTR szFile)
{ {
HFILE fh; HFILE fh;
DWORD dwLen; DWORD dwLen;
@@ -231,7 +231,7 @@ PDIB DibOpenFile(LPTSTR szFile)
if (fh == -1) if (fh == -1)
return NULL; return NULL;
pdib = DibReadBitmapInfo(fh); pdib = wxDibReadBitmapInfo(fh);
if (!pdib) if (!pdib)
return NULL; return NULL;
@@ -239,7 +239,7 @@ PDIB DibOpenFile(LPTSTR szFile)
/* How much memory do we need to hold the DIB */ /* How much memory do we need to hold the DIB */
dwBits = pdib->biSizeImage; dwBits = pdib->biSizeImage;
dwLen = pdib->biSize + DibPaletteSize(pdib) + dwBits; dwLen = pdib->biSize + wxDibPaletteSize(pdib) + dwBits;
/* Can we get more memory? */ /* Can we get more memory? */
@@ -258,7 +258,7 @@ PDIB DibOpenFile(LPTSTR szFile)
if (pdib) if (pdib)
{ {
/* read in the bits */ /* read in the bits */
_hread(fh, (LPBYTE)pdib + (UINT)pdib->biSize + DibPaletteSize(pdib), dwBits); _hread(fh, (LPBYTE)pdib + (UINT)pdib->biSize + wxDibPaletteSize(pdib), dwBits);
} }
_lclose(fh); _lclose(fh);
@@ -275,7 +275,7 @@ PDIB DibOpenFile(LPTSTR szFile)
* bitmap formats, but will always return a "new" BITMAPINFO. * bitmap formats, but will always return a "new" BITMAPINFO.
*/ */
PDIB DibReadBitmapInfo(HFILE fh) PDIB wxDibReadBitmapInfo(HFILE fh)
{ {
DWORD off; DWORD off;
int size; int size;
@@ -336,16 +336,16 @@ PDIB DibReadBitmapInfo(HFILE fh)
break; break;
} }
nNumColors = DibNumColors(&bi); nNumColors = wxDibNumColors(&bi);
#if 0 #if 0
if (bi.biSizeImage == 0) if (bi.biSizeImage == 0)
bi.biSizeImage = DibSizeImage(&bi); bi.biSizeImage = DibSizeImage(&bi);
if (bi.biClrUsed == 0) if (bi.biClrUsed == 0)
bi.biClrUsed = DibNumColors(&bi); bi.biClrUsed = wxDibNumColors(&bi);
#else #else
FixBitmapInfo(&bi); wxFixBitmapInfo(&bi);
#endif #endif
pdib = (PDIB)GlobalAllocPtr(GMEM_MOVEABLE,(LONG)bi.biSize + nNumColors * sizeof(RGBQUAD)); pdib = (PDIB)GlobalAllocPtr(GMEM_MOVEABLE,(LONG)bi.biSize + nNumColors * sizeof(RGBQUAD));
@@ -355,7 +355,7 @@ PDIB DibReadBitmapInfo(HFILE fh)
*pdib = bi; *pdib = bi;
pRgb = DibColors(pdib); pRgb = wxDibColors(pdib);
if (nNumColors) if (nNumColors)
{ {
@@ -402,7 +402,7 @@ PDIB DibReadBitmapInfo(HFILE fh)
* in the passed palette * in the passed palette
*/ */
BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage) BOOL wxDibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage)
{ {
PALETTEENTRY ape[256]; PALETTEENTRY ape[256];
RGBQUAD FAR * pRgb; RGBQUAD FAR * pRgb;
@@ -416,14 +416,14 @@ BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage)
if (!pdib) if (!pdib)
return FALSE; return FALSE;
nColors = DibNumColors(pdib); nColors = wxDibNumColors(pdib);
if (nColors == 3 && DibCompression(pdib) == BI_BITFIELDS) if (nColors == 3 && wxDibCompression(pdib) == BI_BITFIELDS)
nColors = 0; nColors = 0;
if (nColors > 0) if (nColors > 0)
{ {
pRgb = DibColors(pdib); pRgb = wxDibColors(pdib);
switch (wUsage) switch (wUsage)
{ {
@@ -464,7 +464,7 @@ BOOL DibSetUsage(PDIB pdib, HPALETTE hpal,UINT wUsage)
* given number of bits per pixel * given number of bits per pixel
*/ */
PDIB DibCreate(int bits, int dx, int dy) PDIB wxDibCreate(int bits, int dx, int dy)
{ {
LPBITMAPINFOHEADER lpbi ; LPBITMAPINFOHEADER lpbi ;
DWORD dwSizeImage; DWORD dwSizeImage;
@@ -616,7 +616,7 @@ static void hmemmove(BYTE _huge *d, BYTE _huge *s, LONG len)
* the colors of the given palette. * the colors of the given palette.
*/ */
BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal) BOOL wxDibMapToPalette(PDIB pdib, HPALETTE hpal)
{ {
LPBITMAPINFOHEADER lpbi; LPBITMAPINFOHEADER lpbi;
PALETTEENTRY pe; PALETTEENTRY pe;
@@ -632,13 +632,13 @@ BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal)
return FALSE; return FALSE;
lpbi = (LPBITMAPINFOHEADER)pdib; lpbi = (LPBITMAPINFOHEADER)pdib;
lpRgb = DibColors(pdib); lpRgb = wxDibColors(pdib);
GetObject(hpal,sizeof(int),(LPSTR)&nPalColors); GetObject(hpal,sizeof(int),(LPSTR)&nPalColors);
nDibColors = DibNumColors(pdib); nDibColors = wxDibNumColors(pdib);
if ((SizeImage = lpbi->biSizeImage) == 0) if ((SizeImage = lpbi->biSizeImage) == 0)
SizeImage = DibSizeImage(lpbi); SizeImage = wxDibSizeImage(lpbi);
// //
// build a xlat table. from the current DIB colors to the given // build a xlat table. from the current DIB colors to the given
@@ -647,7 +647,7 @@ BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal)
for (n=0; n<nDibColors; n++) for (n=0; n<nDibColors; n++)
xlat[n] = (BYTE)GetNearestPaletteIndex(hpal,RGB(lpRgb[n].rgbRed,lpRgb[n].rgbGreen,lpRgb[n].rgbBlue)); xlat[n] = (BYTE)GetNearestPaletteIndex(hpal,RGB(lpRgb[n].rgbRed,lpRgb[n].rgbGreen,lpRgb[n].rgbBlue));
lpBits = (LPBYTE)DibPtr(lpbi); lpBits = (LPBYTE)wxDibPtr(lpbi);
lpbi->biClrUsed = nPalColors; lpbi->biClrUsed = nPalColors;
// //
@@ -656,14 +656,14 @@ BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal)
if (nPalColors > nDibColors) if (nPalColors > nDibColors)
{ {
GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0); GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0);
hmemmove((BYTE _huge *)DibPtr(lpbi), (BYTE _huge *)lpBits, SizeImage); hmemmove((BYTE _huge *)wxDibPtr(lpbi), (BYTE _huge *)lpBits, SizeImage);
lpBits = (LPBYTE)DibPtr(lpbi); lpBits = (LPBYTE)wxDibPtr(lpbi);
} }
else if (nPalColors < nDibColors) else if (nPalColors < nDibColors)
{ {
hmemcpy(DibPtr(lpbi), lpBits, SizeImage); hmemcpy(wxDibPtr(lpbi), lpBits, SizeImage);
GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0); GlobalReAllocPtr(lpbi, lpbi->biSize + nPalColors*sizeof(RGBQUAD) + SizeImage, 0);
lpBits = (LPBYTE)DibPtr(lpbi); lpBits = (LPBYTE)wxDibPtr(lpbi);
} }
// //
@@ -704,7 +704,7 @@ BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal)
} }
HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags) HPALETTE wxMakePalette(const BITMAPINFO FAR* Info, UINT flags)
{ {
HPALETTE hPalette; HPALETTE hPalette;
const RGBQUAD FAR* rgb = Info->bmiColors; const RGBQUAD FAR* rgb = Info->bmiColors;

View File

@@ -131,9 +131,9 @@ wxPNGReader::Create(int width, int height, int depth, int colortype)
} }
RawImage = 0; RawImage = 0;
Palette = 0; Palette = 0;
lpbi = DibCreate(Depth, Width, Height); lpbi = wxDibCreate(Depth, Width, Height);
if (lpbi) { if (lpbi) {
RawImage = (ImagePointerType)DibPtr(lpbi); RawImage = (ImagePointerType)wxDibPtr(lpbi);
EfeWidth = (long)(((long)Width*Depth + 31) / 32) * 4; EfeWidth = (long)(((long)Width*Depth + 31) / 32) * 4;
imageOK = TRUE; imageOK = TRUE;
} }
@@ -217,7 +217,7 @@ bool wxPNGReader::SetPalette(wxPalette* colourmap)
return FALSE; return FALSE;
ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR);
Palette = colourmap; Palette = colourmap;
return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); return (wxDibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0);
} }
bool bool
@@ -231,7 +231,7 @@ wxPNGReader::SetPalette(int n, byte *r, byte *g, byte *b)
if (!b) b = g; if (!b) b = g;
Palette->Create(n, r, g, b); Palette->Create(n, r, g, b);
ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR);
return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); return (wxDibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0);
} }
bool bool
@@ -257,7 +257,7 @@ wxPNGReader::SetPalette(int n, rgb_color_struct *rgb_struct)
Palette->Create(n, r, g, b); Palette->Create(n, r, g, b);
ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR); ColorType |= (COLORTYPE_PALETTE | COLORTYPE_COLOR);
return (DibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0); return (wxDibSetUsage(lpbi, (HPALETTE) Palette->GetHPALETTE(), WXIMA_COLORS ) != 0);
} }
void wxPNGReader::NullData() void wxPNGReader::NullData()

View File

@@ -944,7 +944,7 @@ WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE WXUNUSED(hInstance), void
WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap) WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap)
{ {
HANDLE hDIB = BitmapToDIB((HBITMAP) hBitmap, 0); HANDLE hDIB = wxBitmapToDIB((HBITMAP) hBitmap, 0);
if (hDIB) if (hDIB)
{ {
#ifdef __WINDOWS_386__ #ifdef __WINDOWS_386__