X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e74d03b7f4dec5b7f254192541f72182c7558b9..ee8bf34fbaaccbc13239f7dde94f104a6cdb1539:/src/mac/carbon/bitmap.cpp diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 7ef70887d6..67ec567512 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -445,7 +445,7 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits if ( no_bits == 1 ) { M_BITMAPDATA->m_bitmapType = kMacBitmapTypeGrafWorld ; - MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) = wxMacCreateGWorld( the_width , the_height , no_bits ) ; + M_BITMAPDATA->m_hBitmap = wxMacCreateGWorld( the_width , the_height , no_bits ) ; M_BITMAPDATA->m_ok = (MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap) != NULL ) ; CGrafPtr origPort ; @@ -551,7 +551,9 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData(); ref->m_numColors = M_BITMAPDATA->m_numColors; - ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette; +#if wxUSE_PALETTE + ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette; +#endif // wxUSE_PALETTE ref->m_bitmapType = M_BITMAPDATA->m_bitmapType; // Copy sub region of this bitmap @@ -721,7 +723,6 @@ bool wxBitmap::Create(void *data, wxBitmapType type, int width, int height, int wxBitmap::wxBitmap(const wxImage& image, int depth) { wxCHECK_RET( image.Ok(), wxT("invalid image") ) - wxCHECK_RET( depth == -1, wxT("invalid bitmap depth") ) m_refData = new wxBitmapRefData(); @@ -1031,6 +1032,7 @@ void wxBitmap::SetOk(bool isOk) M_BITMAPDATA->m_ok = isOk; } +#if wxUSE_PALETTE wxPalette *wxBitmap::GetPalette() const { wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") ); @@ -1045,6 +1047,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) M_BITMAPDATA->m_bitmapPalette = palette ; } +#endif // wxUSE_PALETTE void wxBitmap::SetMask(wxMask *mask) {