wxX11:
Lots of wxBitmap et al work. Adapted wxIcon, wxCursor to this. Split wxApp init things up so that the X11 display is available sooner. Changed initial display code accordingly. Corrected wxDC::DrawBitmap. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -602,9 +602,7 @@ void wxApp::CleanUp()
|
||||
wxCleanUpResourceSystem();
|
||||
#endif
|
||||
|
||||
if (wxTheColourDatabase)
|
||||
delete wxTheColourDatabase;
|
||||
|
||||
delete wxTheColourDatabase;
|
||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
||||
|
||||
wxDeleteStockObjects();
|
||||
@@ -614,17 +612,16 @@ void wxApp::CleanUp()
|
||||
delete wxTheApp;
|
||||
wxTheApp = (wxApp*) NULL;
|
||||
|
||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
||||
// create a module for that as it's part of the core.
|
||||
delete[] wxBuffer;
|
||||
wxBuffer = NULL;
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
|
||||
#if wxUSE_THREADS
|
||||
delete wxPendingEvents;
|
||||
delete wxPendingEventsLocker;
|
||||
#endif
|
||||
|
||||
delete[] wxBuffer;
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
|
||||
// check for memory leaks
|
||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
||||
|
@@ -300,6 +300,8 @@ bool wxBitmap::Create( int width, int height, int depth )
|
||||
|
||||
bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
{
|
||||
UnRef();
|
||||
|
||||
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
|
||||
|
||||
GdkVisual *visual = wxTheApp->GetGdkVisual();
|
||||
@@ -327,6 +329,8 @@ bool wxBitmap::CreateFromXpm( const char **bits )
|
||||
|
||||
bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
||||
{
|
||||
UnRef();
|
||||
|
||||
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") )
|
||||
wxCHECK_MSG( depth == -1 || depth == 1, FALSE, wxT("invalid bitmap depth") )
|
||||
|
||||
@@ -510,7 +514,7 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
|
||||
if (bpp > 8)
|
||||
{
|
||||
if ((visual->red_mask > visual->green_mask) && (visual->green_mask > visual->blue_mask)) b_o = RGB;
|
||||
else if ((visual->red_mask > visual->blue_mask) && (visual->blue_mask > visual->green_mask)) b_o = RGB;
|
||||
else if ((visual->red_mask > visual->blue_mask) && (visual->blue_mask > visual->green_mask)) b_o = RBG;
|
||||
else if ((visual->blue_mask > visual->red_mask) && (visual->red_mask > visual->green_mask)) b_o = BRG;
|
||||
else if ((visual->blue_mask > visual->green_mask) && (visual->green_mask > visual->red_mask)) b_o = BGR;
|
||||
else if ((visual->green_mask > visual->red_mask) && (visual->red_mask > visual->blue_mask)) b_o = GRB;
|
||||
|
Reference in New Issue
Block a user