Add GetDrawable convenience function that returns m_bitmap
if the wxBitmap is monochrome or m_pixmap if the wxBitmap is polichrome. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -130,7 +130,9 @@ public:
|
|||||||
|
|
||||||
WXPixmap GetPixmap() const;
|
WXPixmap GetPixmap() const;
|
||||||
WXPixmap GetBitmap() const;
|
WXPixmap GetBitmap() const;
|
||||||
|
|
||||||
|
WXPixmap GetDrawable() const;
|
||||||
|
|
||||||
WXDisplay *GetDisplay() const;
|
WXDisplay *GetDisplay() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -1107,6 +1107,13 @@ WXPixmap wxBitmap::GetBitmap() const
|
|||||||
return M_BMPDATA->m_bitmap;
|
return M_BMPDATA->m_bitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WXPixmap wxBitmap::GetDrawable() const
|
||||||
|
{
|
||||||
|
wxCHECK_MSG( Ok(), (WXPixmap) NULL, wxT("invalid bitmap") );
|
||||||
|
|
||||||
|
return M_BMPDATA->m_bpp == 1 ? M_BMPDATA->m_bitmap : M_BMPDATA->m_pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
WXDisplay *wxBitmap::GetDisplay() const
|
WXDisplay *wxBitmap::GetDisplay() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), (WXDisplay*) NULL, wxT("invalid bitmap") );
|
wxCHECK_MSG( Ok(), (WXDisplay*) NULL, wxT("invalid bitmap") );
|
||||||
|
Reference in New Issue
Block a user