new DrawIcon implementation, turned off by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d692ea1c0e
commit
64503e36f9
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user