From 0ff0b7813665a76c2c693b8de1c16e512daea1fb Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 23 Dec 2012 18:42:34 +0000 Subject: [PATCH] making sure we are using correct implementation for shades git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/graphics.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index 7dd6911483..b1226cccc8 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -2711,6 +2711,13 @@ void wxMacCoreGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w if (m_composition == wxCOMPOSITION_DEST) return; + // when using shading, we have to go back to drawing paths + if ( !m_brush.IsNull() && ((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->IsShading() ) + { + wxGraphicsContext::DrawRectangle( x,y,w,h ); + return; + } + CGRect rect = CGRectMake( (CGFloat) x , (CGFloat) y , (CGFloat) w , (CGFloat) h ); if ( !m_brush.IsNull() ) { -- 2.45.2