diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index cf5e9a28fd..0be23e06ca 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -2254,9 +2254,17 @@ void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDoubl CGContextTranslateCTM( m_cgContext,(CGFloat) x ,(CGFloat) (y + h) ); CGContextScaleCTM( m_cgContext, 1, -1 ); #if wxOSX_USE_COCOA_OR_CARBON +#if 1 CGRect r = CGRectMake( (CGFloat) 0.0 , (CGFloat) 0.0 , (CGFloat) w , (CGFloat) h ); PlotIconRefInContext( m_cgContext , &r , kAlignNone , kTransformNone , NULL , kPlotIconRefNormalFlags , icon.GetHICON() ); +#else + CGRect r = CGRectMake( (CGFloat) 0.0 , (CGFloat) 0.0 , (CGFloat) w , (CGFloat) h ); + const WX_NSImage nsImage = icon.GetNSImage(); + + CGImageRef cgImage = wxOSXGetCGImageFromNSImage( nsImage , &r, m_cgContext ); + wxMacDrawCGImage( m_cgContext, &r, cgImage); +#endif #endif CGContextRestoreGState( m_cgContext );