do coordinate conversion in the context creation already
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -227,6 +227,8 @@ bool wxBitmapRefData::Create( int w , int h , int d )
|
||||
#else
|
||||
m_hBitmap = CGBitmapContextCreate((char*) data, m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst );
|
||||
wxASSERT_MSG( m_hBitmap , wxT("Unable to create CGBitmapContext context") ) ;
|
||||
CGContextTranslateCTM( m_hBitmap, 0, m_height );
|
||||
CGContextScaleCTM( m_hBitmap, 1, -1 );
|
||||
#endif
|
||||
m_ok = ( m_hBitmap != NULL ) ;
|
||||
|
||||
@@ -243,6 +245,8 @@ void wxBitmapRefData::UseAlpha( bool use )
|
||||
CGContextRelease( m_hBitmap );
|
||||
m_hBitmap = CGBitmapContextCreate((char*) m_memBuf.GetData(), m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), m_hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst );
|
||||
wxASSERT_MSG( m_hBitmap , wxT("Unable to create CGBitmapContext context") ) ;
|
||||
CGContextTranslateCTM( m_hBitmap, 0, m_height );
|
||||
CGContextScaleCTM( m_hBitmap, 1, -1 );
|
||||
#else
|
||||
if ( m_hasAlpha )
|
||||
{
|
||||
|
Reference in New Issue
Block a user