m_depth = d ;
m_hBitmap = NULL ;
- m_bytesPerRow = GetBestBytesPerRow( w * 4 ) ;
- size_t size = m_bytesPerRow * h ;
+ m_bytesPerRow = GetBestBytesPerRow( m_width * 4 ) ;
+ size_t size = m_bytesPerRow * m_height ;
void* data = m_memBuf.GetWriteBuf( size ) ;
if ( data != NULL )
{
{
if ( m_depth != 1 && m_bitmapMask == NULL )
{
+#if 0
+ // in order for this code to work properly, wxMask would have to invert black and white
+ // in the native bitmap
if ( m_bitmapMask )
{
CGImageRef tempImage = CGBitmapContextCreateImage( m_hBitmap );
CGImageRelease(tempImage);
}
else
+#endif
image = CGBitmapContextCreateImage( m_hBitmap );
}
else
m_hBitmap = NULL ;
}
- if (m_bitmapMask)
- {
- delete m_bitmapMask;
- m_bitmapMask = NULL;
- }
+ wxDELETE(m_bitmapMask);
}
wxBitmapRefData::~wxBitmapRefData()
WX_NSImage wxBitmap::GetNSImage() const
{
wxCFRef< CGImageRef > cgimage(CreateCGImage());
- return wxOSXCreateNSImageFromCGImage( cgimage );
+ return wxOSXGetNSImageFromCGImage( cgimage );
}
#endif
WX_UIImage wxBitmap::GetUIImage() const
{
wxCFRef< CGImageRef > cgimage(CreateCGImage());
- return wxOSXCreateUIImageFromCGImage( cgimage );
+ return wxOSXGetUIImageFromCGImage( cgimage );
}
#endif
int height = image.GetHeight();
wxBitmapRefData* bitmapRefData;
-
+
m_refData = bitmapRefData = new wxBitmapRefData( width , height , depth ) ;
if ( bitmapRefData->IsOk())
// Standard Handlers
// ----------------------------------------------------------------------------
-#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__)
+#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__)
class WXDLLEXPORT wxPICTResourceHandler: public wxBitmapHandler
{