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:
@@ -840,10 +840,7 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf )
|
|||||||
|
|
||||||
if ( cgImageRef )
|
if ( cgImageRef )
|
||||||
{
|
{
|
||||||
m_bitmap.Create( CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );
|
m_bitmap.Create( 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 ) ;
|
|
||||||
CGImageRelease(cgImageRef);
|
CGImageRelease(cgImageRef);
|
||||||
cgImageRef = NULL;
|
cgImageRef = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user