- wxCHECK_RET( (depth == gdk_window_get_visual( parent )->depth) ||
- (depth == 1), wxT("invalid bitmap depth") )
+bool wxBitmap::Create( int width, int height, int depth )
+{
+ UnRef();
+
+ wxCHECK_MSG( (width > 0) && (height > 0), FALSE, wxT("invalid bitmap size") )
+
+ GdkVisual *visual = gdk_window_get_visual( wxRootWindow->window );
+ wxASSERT( visual );
+
+ if (depth == -1) depth = visual->depth;
+
+ wxCHECK_MSG( (depth == visual->depth) ||
+ (depth == 1), FALSE, wxT("invalid bitmap depth") )