From: Stefan Csomor Date: Thu, 4 Mar 2004 16:16:58 +0000 (+0000) Subject: support for wxUSE_PALETTE = 0 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a6de86fa530d95b6f30e0349e81de8b8692b348f?hp=884215788fcb7a3364ff6e1494c5da90fb2721bf support for wxUSE_PALETTE = 0 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/bitmap.h b/include/wx/mac/bitmap.h index 759cccfe1b..a8e2439362 100644 --- a/include/wx/mac/bitmap.h +++ b/include/wx/mac/bitmap.h @@ -86,7 +86,9 @@ public: int m_depth; bool m_ok; int m_numColors; +#if wxUSE_PALETTE wxPalette m_bitmapPalette; +#endif // wxUSE_PALETTE int m_quality; int m_bitmapType ; @@ -186,8 +188,10 @@ public: void SetQuality(int q); void SetOk(bool isOk); - wxPalette* GetPalette() const; - void SetPalette(const wxPalette& palette); +#if wxUSE_PALETTE + wxPalette* GetPalette() const; + void SetPalette(const wxPalette& palette); +#endif // wxUSE_PALETTE wxMask *GetMask() const; void SetMask(wxMask *mask) ; diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 84b1bae5c1..6cbaa9d9b7 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -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 @@ -1031,6 +1033,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 +1048,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) M_BITMAPDATA->m_bitmapPalette = palette ; } +#endif // wxUSE_PALETTE void wxBitmap::SetMask(wxMask *mask) { diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 84b1bae5c1..6cbaa9d9b7 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -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 @@ -1031,6 +1033,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 +1048,7 @@ void wxBitmap::SetPalette(const wxPalette& palette) M_BITMAPDATA->m_bitmapPalette = palette ; } +#endif // wxUSE_PALETTE void wxBitmap::SetMask(wxMask *mask) {