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
This commit is contained in:
parent
634034d582
commit
b0bb9f2828
@ -396,10 +396,7 @@ protected:
|
|||||||
void Init(Graphics* graphics, int width, int height);
|
void Init(Graphics* graphics, int width, int height);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void DoDrawText(const wxString& str, wxDouble x, wxDouble y)
|
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);
|
|
||||||
|
|
||||||
Graphics* m_context;
|
Graphics* m_context;
|
||||||
wxStack<GraphicsState> m_stateStack;
|
wxStack<GraphicsState> m_stateStack;
|
||||||
@ -1733,9 +1730,8 @@ void wxGDIPlusContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxD
|
|||||||
DeleteObject(iconInfo.hbmMask);
|
DeleteObject(iconInfo.hbmMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
|
void wxGDIPlusContext::DoDrawText(const wxString& str,
|
||||||
wxDouble x, wxDouble y,
|
wxDouble x, wxDouble y )
|
||||||
const wxGraphicsBrush& brush)
|
|
||||||
{
|
{
|
||||||
if (m_composition == wxCOMPOSITION_DEST)
|
if (m_composition == wxCOMPOSITION_DEST)
|
||||||
return;
|
return;
|
||||||
@ -1748,8 +1744,6 @@ void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
|
|||||||
|
|
||||||
wxGDIPlusFontData * const
|
wxGDIPlusFontData * const
|
||||||
fontData = (wxGDIPlusFontData *)m_font.GetRefData();
|
fontData = (wxGDIPlusFontData *)m_font.GetRefData();
|
||||||
wxGDIPlusBrushData * const
|
|
||||||
brushData = (wxGDIPlusBrushData *)brush.GetRefData();
|
|
||||||
|
|
||||||
m_context->DrawString
|
m_context->DrawString
|
||||||
(
|
(
|
||||||
@ -1758,8 +1752,7 @@ void wxGDIPlusContext::DoDrawFilledText(const wxString& str,
|
|||||||
fontData->GetGDIPlusFont(),
|
fontData->GetGDIPlusFont(),
|
||||||
PointF(x, y),
|
PointF(x, y),
|
||||||
StringFormat::GenericTypographic(),
|
StringFormat::GenericTypographic(),
|
||||||
brushData ? brushData->GetGDIPlusBrush()
|
fontData->GetGDIPlusBrush()
|
||||||
: fontData->GetGDIPlusBrush()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user