git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32515
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// we don't dare premultiplied alpha yet
#define wxMAC_USE_PREMULTIPLIED_ALPHA 0
// we don't dare premultiplied alpha yet
#define wxMAC_USE_PREMULTIPLIED_ALPHA 0
void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType )
{
memset( info , 0 , sizeof(ControlButtonContentInfo) ) ;
void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType )
{
memset( info , 0 , sizeof(ControlButtonContentInfo) ) ;
+#endif //wxUSE_BMPBUTTON
+
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
void wxBitmapRefData::Init()
#define M_BITMAPDATA ((wxBitmapRefData *)m_refData)
void wxBitmapRefData::Init()
// transform into IconRef
static int iconCounter = 2 ;
// transform into IconRef
static int iconCounter = 2 ;
- OSStatus err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) iconCounter, iconFamily, &m_iconRef ) ;
+#ifdef __WXDEBUG__
+ OSStatus err =
+#endif
+ RegisterIconRefFromIconFamily( 'WXNG' , (OSType) iconCounter, iconFamily, &m_iconRef ) ;
wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ;
// we have to retain a reference, as Unregister will decrement it
AcquireIconRef( m_iconRef ) ;
wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ;
// we have to retain a reference, as Unregister will decrement it
AcquireIconRef( m_iconRef ) ;
bool wxBitmap::CreateFromXpm(const char **bits)
{
bool wxBitmap::CreateFromXpm(const char **bits)
{
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
*this = wxBitmap(img);
return TRUE;
wxCHECK_MSG( bits != NULL, FALSE, wxT("invalid bitmap data") )
wxXPMDecoder decoder;
wxImage img = decoder.ReadData(bits);
wxCHECK_MSG( img.Ok(), FALSE, wxT("invalid bitmap data") )
*this = wxBitmap(img);
return TRUE;
+#else
+ return FALSE;
+#endif
wxImage loadimage(filename, type);
if (loadimage.Ok()) {
*this = loadimage;
return true;
}
wxImage loadimage(filename, type);
if (loadimage.Ok()) {
*this = loadimage;
return true;
}
}
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
return false;
}
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
return false;
return handler->Create(this, data, type, width, height, depth);
}
return handler->Create(this, data, type, width, height, depth);
}
wxBitmap::wxBitmap(const wxImage& image, int depth)
{
wxCHECK_RET( image.Ok(), wxT("invalid image") )
wxBitmap::wxBitmap(const wxImage& image, int depth)
{
wxCHECK_RET( image.Ok(), wxT("invalid image") )
bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type,
const wxPalette *palette) const
bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type,
const wxPalette *palette) const
wxImage image = ConvertToImage();
wxImage image = ConvertToImage();
return image.SaveFile(filename, type);
return image.SaveFile(filename, type);
}
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);
}
wxLogWarning(wxT("no bitmap handler for type %d defined."), type);