backport, supporting alpha channel from clipboard correctly, closes #16198

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-04-30 07:01:54 +00:00
parent eecb8183d6
commit 7d3fcb81e1

View File

@@ -840,10 +840,7 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf )
if ( cgImageRef )
{
m_bitmap.Create( CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
// since our context is upside down we dont use CGContextDrawImage
wxMacDrawCGImage( (CGContextRef) m_bitmap.GetHBITMAP() , &r, cgImageRef ) ;
m_bitmap.Create( cgImageRef );
CGImageRelease(cgImageRef);
cgImageRef = NULL;
}