]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix generic implementation of wxDC::GradientFillConcentric().
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Oct 2010 14:23:14 +0000 (14:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Oct 2010 14:23:14 +0000 (14:23 +0000)
The selected colour was not used as the code simply changed the value of
m_pen but didn't call SetPen() to actually use it. This resulted in always
using the default (black) colour when drawing concentric gradients.

Fix this by calling SetPen().

See #12337.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcbase.cpp

index 5cad40cfeed5ae89617577eb7970cf983daf6134..df11b95eeaca56d553859d9bb98040187ba4c844 100644 (file)
@@ -1108,7 +1108,7 @@ void wxDCImpl::DoGradientFillConcentric(const wxRect& rect,
             nB = (wxUint8)(nB1 + ((nB2 - nB1) * nGradient / 100));
 
             //set the pixel
-            m_pen = wxColour(nR,nG,nB);
+            SetPen(wxColour(nR,nG,nB));
             DoDrawPoint(x + rect.GetLeft(), y + rect.GetTop());
         }
     }