Applied [ 671333 ] wxPrinterDC::DoBlit() 24 bit fix (2.4)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -530,7 +530,11 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
height = bmp.GetHeight();
|
||||
|
||||
BITMAPINFO *info = (BITMAPINFO *) malloc( sizeof( BITMAPINFOHEADER ) + 256 * sizeof(RGBQUAD ) );
|
||||
int iBitsSize = ((width + 3 ) & ~3 ) * height;
|
||||
#if wxUSE_DRAWBITMAP_24BITS
|
||||
int iBitsSize = (((width * 3) + 3 ) & ~3 ) * height;
|
||||
#else
|
||||
int iBitsSize = ((width + 3 ) & ~3 ) * height ;
|
||||
#endif
|
||||
|
||||
void* bits = malloc( iBitsSize );
|
||||
|
||||
@@ -540,7 +544,11 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
info->bmiHeader.biWidth = width;
|
||||
info->bmiHeader.biHeight = height;
|
||||
info->bmiHeader.biPlanes = 1;
|
||||
#if wxUSE_DRAWBITMAP_24BITS
|
||||
info->bmiHeader.biBitCount = 24;
|
||||
#else
|
||||
info->bmiHeader.biBitCount = 8;
|
||||
#endif
|
||||
info->bmiHeader.biCompression = BI_RGB;
|
||||
|
||||
ScreenHDC display;
|
||||
|
Reference in New Issue
Block a user