X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/795160b7f64e8e70e90e1ad49689e6af280ab5f1..66f75561893ea7b4bf429d1882d9cc0407ba932d:/src/osx/core/bitmap.cpp diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index a2f7660435..64d0b39e2d 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -639,6 +639,9 @@ CGImageRef wxBitmapRefData::CreateCGImage() const { if ( m_depth != 1 && m_bitmapMask == NULL ) { +#if 0 + // in order for this code to work properly, wxMask would have to invert black and white + // in the native bitmap if ( m_bitmapMask ) { CGImageRef tempImage = CGBitmapContextCreateImage( m_hBitmap ); @@ -648,6 +651,7 @@ CGImageRef wxBitmapRefData::CreateCGImage() const CGImageRelease(tempImage); } else +#endif image = CGBitmapContextCreateImage( m_hBitmap ); } else @@ -778,11 +782,7 @@ void wxBitmapRefData::Free() m_hBitmap = NULL ; } - if (m_bitmapMask) - { - delete m_bitmapMask; - m_bitmapMask = NULL; - } + wxDELETE(m_bitmapMask); } wxBitmapRefData::~wxBitmapRefData() @@ -1024,7 +1024,7 @@ IconRef wxBitmap::CreateIconRef() const WX_NSImage wxBitmap::GetNSImage() const { wxCFRef< CGImageRef > cgimage(CreateCGImage()); - return wxOSXCreateNSImageFromCGImage( cgimage ); + return wxOSXGetNSImageFromCGImage( cgimage ); } #endif @@ -1034,7 +1034,7 @@ WX_NSImage wxBitmap::GetNSImage() const WX_UIImage wxBitmap::GetUIImage() const { wxCFRef< CGImageRef > cgimage(CreateCGImage()); - return wxOSXCreateUIImageFromCGImage( cgimage ); + return wxOSXGetUIImageFromCGImage( cgimage ); } #endif @@ -1171,7 +1171,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) int height = image.GetHeight(); wxBitmapRefData* bitmapRefData; - + m_refData = bitmapRefData = new wxBitmapRefData( width , height , depth ) ; if ( bitmapRefData->IsOk()) @@ -1654,7 +1654,7 @@ WXHBITMAP wxMask::GetHBITMAP() const // Standard Handlers // ---------------------------------------------------------------------------- -#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__) +#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__) class WXDLLEXPORT wxPICTResourceHandler: public wxBitmapHandler {