added wxDC::CopyAttributes() and use it in wxBufferedDC to ensure that wxAutoBufferedPaintDC font is correctly initialized from the window font, as it already happens with wxPaintDC that it mimics
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1115,7 +1115,8 @@ void wxDCImpl::InheritAttributes(wxWindow *win)
|
||||
SetFont(win->GetFont());
|
||||
SetTextForeground(win->GetForegroundColour());
|
||||
SetTextBackground(win->GetBackgroundColour());
|
||||
SetBackground(wxBrush(win->GetBackgroundColour()));
|
||||
SetBackground(win->GetBackgroundColour());
|
||||
SetLayoutDirection(win->GetLayoutDirection());
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1124,6 +1125,15 @@ void wxDCImpl::InheritAttributes(wxWindow *win)
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
|
||||
|
||||
void wxDC::CopyAttributes(const wxDC& dc)
|
||||
{
|
||||
SetFont(dc.GetFont());
|
||||
SetTextForeground(dc.GetTextForeground());
|
||||
SetTextBackground(dc.GetTextBackground());
|
||||
SetBackground(dc.GetBackground());
|
||||
SetLayoutDirection(dc.GetLayoutDirection());
|
||||
}
|
||||
|
||||
void wxDC::DrawLabel(const wxString& text,
|
||||
const wxBitmap& bitmap,
|
||||
const wxRect& rect,
|
||||
|
||||
Reference in New Issue
Block a user