support for wxUSE_PALETTE = 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,7 +86,9 @@ public:
|
|||||||
int m_depth;
|
int m_depth;
|
||||||
bool m_ok;
|
bool m_ok;
|
||||||
int m_numColors;
|
int m_numColors;
|
||||||
|
#if wxUSE_PALETTE
|
||||||
wxPalette m_bitmapPalette;
|
wxPalette m_bitmapPalette;
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
int m_quality;
|
int m_quality;
|
||||||
|
|
||||||
int m_bitmapType ;
|
int m_bitmapType ;
|
||||||
@@ -186,8 +188,10 @@ public:
|
|||||||
void SetQuality(int q);
|
void SetQuality(int q);
|
||||||
void SetOk(bool isOk);
|
void SetOk(bool isOk);
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
wxPalette* GetPalette() const;
|
wxPalette* GetPalette() const;
|
||||||
void SetPalette(const wxPalette& palette);
|
void SetPalette(const wxPalette& palette);
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
wxMask *GetMask() const;
|
wxMask *GetMask() const;
|
||||||
void SetMask(wxMask *mask) ;
|
void SetMask(wxMask *mask) ;
|
||||||
|
@@ -551,7 +551,9 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const
|
|||||||
wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData();
|
wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData();
|
||||||
|
|
||||||
ref->m_numColors = M_BITMAPDATA->m_numColors;
|
ref->m_numColors = M_BITMAPDATA->m_numColors;
|
||||||
|
#if wxUSE_PALETTE
|
||||||
ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette;
|
ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette;
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
ref->m_bitmapType = M_BITMAPDATA->m_bitmapType;
|
ref->m_bitmapType = M_BITMAPDATA->m_bitmapType;
|
||||||
|
|
||||||
// Copy sub region of this bitmap
|
// Copy sub region of this bitmap
|
||||||
@@ -1031,6 +1033,7 @@ void wxBitmap::SetOk(bool isOk)
|
|||||||
M_BITMAPDATA->m_ok = isOk;
|
M_BITMAPDATA->m_ok = isOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
wxPalette *wxBitmap::GetPalette() const
|
wxPalette *wxBitmap::GetPalette() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") );
|
wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") );
|
||||||
@@ -1045,6 +1048,7 @@ void wxBitmap::SetPalette(const wxPalette& palette)
|
|||||||
|
|
||||||
M_BITMAPDATA->m_bitmapPalette = palette ;
|
M_BITMAPDATA->m_bitmapPalette = palette ;
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
void wxBitmap::SetMask(wxMask *mask)
|
void wxBitmap::SetMask(wxMask *mask)
|
||||||
{
|
{
|
||||||
|
@@ -551,7 +551,9 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const
|
|||||||
wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData();
|
wxBitmapRefData *ref = (wxBitmapRefData *)ret.GetRefData();
|
||||||
|
|
||||||
ref->m_numColors = M_BITMAPDATA->m_numColors;
|
ref->m_numColors = M_BITMAPDATA->m_numColors;
|
||||||
|
#if wxUSE_PALETTE
|
||||||
ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette;
|
ref->m_bitmapPalette = M_BITMAPDATA->m_bitmapPalette;
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
ref->m_bitmapType = M_BITMAPDATA->m_bitmapType;
|
ref->m_bitmapType = M_BITMAPDATA->m_bitmapType;
|
||||||
|
|
||||||
// Copy sub region of this bitmap
|
// Copy sub region of this bitmap
|
||||||
@@ -1031,6 +1033,7 @@ void wxBitmap::SetOk(bool isOk)
|
|||||||
M_BITMAPDATA->m_ok = isOk;
|
M_BITMAPDATA->m_ok = isOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
wxPalette *wxBitmap::GetPalette() const
|
wxPalette *wxBitmap::GetPalette() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") );
|
wxCHECK_MSG( Ok(), NULL, wxT("Invalid bitmap GetPalette()") );
|
||||||
@@ -1045,6 +1048,7 @@ void wxBitmap::SetPalette(const wxPalette& palette)
|
|||||||
|
|
||||||
M_BITMAPDATA->m_bitmapPalette = palette ;
|
M_BITMAPDATA->m_bitmapPalette = palette ;
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_PALETTE
|
||||||
|
|
||||||
void wxBitmap::SetMask(wxMask *mask)
|
void wxBitmap::SetMask(wxMask *mask)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user