Added wxQuantize, wxSplashScreen, wxEffects & added palette to wxImage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1020,6 +1020,13 @@ wxBitmap wxImage::ConvertToBitmap() const
|
||||
hbitmap = ::CreateCompatibleBitmap( hdc, width, bmpHeight );
|
||||
::SelectObject( memdc, hbitmap);
|
||||
|
||||
HPALETTE hOldPalette = 0;
|
||||
if (GetPalette().Ok())
|
||||
{
|
||||
hOldPalette = ::SelectPalette(memdc, (HPALETTE) GetPalette().GetHPALETTE(), FALSE);
|
||||
::RealizePalette(memdc);
|
||||
}
|
||||
|
||||
// copy image data into DIB data and then into DDB (in a loop)
|
||||
unsigned char *data = GetData();
|
||||
int i, j, n;
|
||||
@@ -1069,6 +1076,9 @@ wxBitmap wxImage::ConvertToBitmap() const
|
||||
}
|
||||
bitmap.SetHBITMAP( (WXHBITMAP) hbitmap );
|
||||
|
||||
if (hOldPalette)
|
||||
SelectPalette(memdc, hOldPalette, FALSE);
|
||||
|
||||
// similarly, created an mono-bitmap for the possible mask
|
||||
if( HasMask() )
|
||||
{
|
||||
|
Reference in New Issue
Block a user