depth = visual->depth;
wxCHECK_MSG( (depth == visual->depth) || (depth == 1) || (depth == 32), false,
- wxT("invalid bitmap depth") )
+ wxT("invalid bitmap depth") );
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = (wxMask *) NULL;
{
UnRef();
- wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") )
+ wxCHECK_MSG( bits != NULL, false, wxT("invalid bitmap data") );
GdkVisual *visual = wxTheApp->GetGdkVisual();
old_x = x;
}
- if (bpp == 1)
+ if ( dst )
{
if (!pixval)
{
}
// do not forget the last byte
- if ((bpp == 1) && (width % 8 != 0))
+ if ( dst && (width % 8 != 0) )
dst[h*dstbyteperline+width/8] = outbyte;
}
gdk_image_destroy( img );
if (gc) gdk_gc_unref( gc );
- if (bpp == 1)
+ if ( dst )
{
bmp = wxBitmap( (const char *)dst, width, height, 1 );
free( dst );
{
UnRef();
- wxCHECK_MSG( image.Ok(), false, wxT("invalid image") )
- wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") )
+ wxCHECK_MSG( image.Ok(), false, wxT("invalid image") );
+ wxCHECK_MSG( depth == -1 || depth == 1, false, wxT("invalid bitmap depth") );
if (image.GetWidth() <= 0 || image.GetHeight() <= 0)
return false;