X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3562311c8fd0a0a6f7682fa229ad9083b4c9091..39d169639b01d4902583d4e541746a93a156ab78:/src/msw/graphics.cpp diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index af177f3365..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 m_stateStack; @@ -1541,8 +1538,6 @@ bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality interpolat if (m_interpolation == interpolation) return true; - m_interpolation = interpolation; - InterpolationMode interpolationMode = InterpolationModeDefault; switch (interpolation) { @@ -1569,7 +1564,12 @@ bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality interpolat default: return false; } - m_context->SetInterpolationMode(interpolationMode); + + if ( m_context->SetInterpolationMode(interpolationMode) != Gdiplus::Ok ) + return false; + + m_interpolation = interpolation; + return true; } @@ -1730,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; @@ -1745,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 @@ -1755,8 +1752,7 @@ void wxGDIPlusContext::DoDrawFilledText(const wxString& str, fontData->GetGDIPlusFont(), PointF(x, y), StringFormat::GenericTypographic(), - brushData ? brushData->GetGDIPlusBrush() - : fontData->GetGDIPlusBrush() + fontData->GetGDIPlusBrush() ); }