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:
parent
1ca61fa7a7
commit
a29c6824c2
@ -130,7 +130,9 @@ public:
|
||||
|
||||
WXPixmap GetPixmap() const;
|
||||
WXPixmap GetBitmap() const;
|
||||
|
||||
|
||||
WXPixmap GetDrawable() const;
|
||||
|
||||
WXDisplay *GetDisplay() const;
|
||||
|
||||
protected:
|
||||
|
@ -1107,6 +1107,13 @@ WXPixmap wxBitmap::GetBitmap() const
|
||||
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
|
||||
{
|
||||
wxCHECK_MSG( Ok(), (WXDisplay*) NULL, wxT("invalid bitmap") );
|
||||
|
Loading…
Reference in New Issue
Block a user