- wxCHECK_MSG( (width > 0) && (height > 0), FALSE, wxT("invalid bitmap size") )
-
- pixel_format_t pf_dummy, *pf;
- int mglDepth = depth;
-
- switch ( depth )
- {
- case -1:
- wxASSERT_MSG( g_displayDC, wxT("MGL display DC not created yet.") );
-
- g_displayDC->getPixelFormat(pf_dummy);
- mglDepth = g_displayDC->getBitsPerPixel();
- pf = &pf_dummy;
- break;
- case 1:
- case 8:
- pf = NULL;
- break;
- case 15:
- pf = &gs_pixel_format_15;
- break;
- case 16:
- pf = &gs_pixel_format_16;
- break;
- case 24:
- pf = &gs_pixel_format_24;
- break;
- case 32:
- pf = &gs_pixel_format_32;
- break;
- default:
- wxASSERT_MSG( 0, wxT("invalid bitmap depth") );
- return FALSE;
- break;
- }