X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad667945478cda0c0a33e154f1d4403402cffb9e..8bfde0a840b1343b3e86105d53a7d4988ab72c75:/src/common/dcgraph.cpp diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index d5da1bb58b..6a8bfab989 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -762,7 +762,10 @@ void wxGCDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, if ( m_logicalFunction != wxCOPY ) return; - m_graphicContext->DrawText( str, x ,y , DegToRad(angle )); + if ( m_backgroundMode == wxTRANSPARENT ) + m_graphicContext->DrawText( str, x ,y , DegToRad(angle )); + else + m_graphicContext->DrawText( str, x ,y , DegToRad(angle ), m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); } void wxGCDC::DoDrawText(const wxString& str, wxCoord x, wxCoord y) @@ -774,7 +777,10 @@ void wxGCDC::DoDrawText(const wxString& str, wxCoord x, wxCoord y) if ( m_logicalFunction != wxCOPY ) return; - m_graphicContext->DrawText( str, x ,y); + if ( m_backgroundMode == wxTRANSPARENT ) + m_graphicContext->DrawText( str, x ,y); + else + m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); } bool wxGCDC::CanGetTextExtent() const