supporting alpha channel correctly from clipboard, closes #16198

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2014-04-30 06:59:42 +00:00
parent 570926f0d7
commit 617e17b746

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;
}