X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd7915711f6e491b9c70c98132f2b5d1ecc3bc38..72366f68d1036084d1adc5971eeee4885f36fe5c:/src/common/dcgraph.cpp diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index e607c81b10..d5da1bb58b 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -71,6 +71,9 @@ void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx ) m_ok = true; // apply the stored transformations to the passed in context ComputeScaleAndOrigin(); + m_graphicContext->SetFont( m_font , m_textForegroundColour ); + m_graphicContext->SetPen( m_pen ); + m_graphicContext->SetBrush( m_brush); } } @@ -78,12 +81,6 @@ wxGCDC::wxGCDC(const wxWindowDC& dc) { Init(); SetGraphicsContext( wxGraphicsContext::Create(dc) ); - if ( dc.GetFont().Ok()) - m_graphicContext->SetFont( m_graphicContext->CreateFont(dc.GetFont(),dc.GetTextForeground())); - if ( dc.GetPen().Ok()) - m_graphicContext->SetPen( m_graphicContext->CreatePen(dc.GetPen())); - if ( dc.GetBrush().Ok()) - m_graphicContext->SetBrush( m_graphicContext->CreateBrush(dc.GetBrush())); } void wxGCDC::Init()