From b0bb9f28287777ca26fd94f1c987310b190289b5 Mon Sep 17 00:00:00 2001
From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Sun, 1 Apr 2012 13:37:53 +0000
Subject: [PATCH] correct text drawing with background brush, fixes #14161

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/msw/graphics.cpp | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp
index 3388f1375a..cad53a46d0 100644
--- a/src/msw/graphics.cpp
+++ b/src/msw/graphics.cpp
@@ -396,10 +396,7 @@ protected:
     void Init(Graphics* graphics, int width, int height);
 
 private:
-    virtual void DoDrawText(const wxString& str, wxDouble x, wxDouble y)
-        { DoDrawFilledText(str, x, y, wxNullGraphicsBrush); }
-    virtual void DoDrawFilledText(const wxString& str, wxDouble x, wxDouble y,
-                                  const wxGraphicsBrush& backgroundBrush);
+    virtual void DoDrawText(const wxString& str, wxDouble x, wxDouble y);
 
     Graphics* m_context;
     wxStack<GraphicsState> m_stateStack;
@@ -1733,9 +1730,8 @@ void wxGDIPlusContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxD
     DeleteObject(iconInfo.hbmMask);
 }
 
-void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
-                                        wxDouble x, wxDouble y,
-                                        const wxGraphicsBrush& brush)
+void wxGDIPlusContext::DoDrawText(const wxString& str,
+                                        wxDouble x, wxDouble y )
 {
    if (m_composition == wxCOMPOSITION_DEST)
         return;
@@ -1748,9 +1744,7 @@ void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
 
     wxGDIPlusFontData * const
         fontData = (wxGDIPlusFontData *)m_font.GetRefData();
-    wxGDIPlusBrushData * const
-        brushData = (wxGDIPlusBrushData *)brush.GetRefData();
-
+ 
     m_context->DrawString
                (
                     str.wc_str(*wxConvUI),  // string to draw, always Unicode
@@ -1758,8 +1752,7 @@ void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
                     fontData->GetGDIPlusFont(),
                     PointF(x, y),
                     StringFormat::GenericTypographic(),
-                    brushData ? brushData->GetGDIPlusBrush()
-                              : fontData->GetGDIPlusBrush()
+                    fontData->GetGDIPlusBrush()
                );
 }
 
-- 
2.49.0