Committing in .
Patches for VMS Temporarily patch to get the IMAGE sample compiled in MOTIF-mode N.B. GetSubImage still gives rubish Modified Files: wxWindows/setup.h_vms wxWindows/include/wx/motif/bitmap.h wxWindows/src/common/datetime.cpp wxWindows/src/common/descrip.mms wxWindows/src/generic/descrip.mms wxWindows/src/motif/bitmap.cpp ---------------------------------------------------------------------- git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -108,6 +108,8 @@ wxBitmapRefData::~wxBitmapRefData()
|
||||
|
||||
wxList wxBitmap::sm_handlers;
|
||||
|
||||
#define M_BMPDATA ((wxBitmapRefData *)m_refData)
|
||||
|
||||
wxBitmap::wxBitmap()
|
||||
{
|
||||
m_refData = NULL;
|
||||
@@ -308,6 +310,20 @@ void wxBitmap::SetMask(wxMask *mask)
|
||||
M_BITMAPDATA->m_bitmapMask = mask ;
|
||||
}
|
||||
|
||||
wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
|
||||
{
|
||||
wxCHECK_MSG( Ok() &&
|
||||
(rect.x >= 0) && (rect.y >= 0) &&
|
||||
(rect.x+rect.width <= M_BMPDATA->m_width) && (rect.y+rect.height <= M_BMPDATA->m_height),
|
||||
wxNullBitmap, wxT("invalid bitmap or bitmap region") );
|
||||
|
||||
wxBitmap ret( rect.width, rect.height, 0 );
|
||||
wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") );
|
||||
|
||||
// The remaining still TODO
|
||||
return ret;
|
||||
}
|
||||
|
||||
void wxBitmap::AddHandler(wxBitmapHandler *handler)
|
||||
{
|
||||
sm_handlers.Append(handler);
|
||||
|
Reference in New Issue
Block a user