From 4ca8cbec7828b802da9f062ee068b237ceaa097f Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 8 Jun 2007 16:07:25 +0000 Subject: [PATCH] now that the bitmap context is always in topleft coords, we need the adjusted call for drawing an image git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dataobj.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/dataobj.cpp b/src/mac/carbon/dataobj.cpp index ba13860125..008a1cc844 100644 --- a/src/mac/carbon/dataobj.cpp +++ b/src/mac/carbon/dataobj.cpp @@ -819,7 +819,8 @@ bool wxBitmapDataObject::SetData( size_t nSize, const void *pBuf ) { m_bitmap.Create( CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) ); CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) ); - CGContextDrawImage( (CGContextRef) m_bitmap.GetHBITMAP() , r, cgImageRef ) ; + // since our context is upside down we dont use CGContextDrawImage + HIViewDrawCGImage( (CGContextRef) m_bitmap.GetHBITMAP() , &r, cgImageRef ) ; CGImageRelease(cgImageRef); cgImageRef = NULL; }