adding measuring contexts, streamlining printing code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2006-11-04 07:50:06 +00:00
parent fd7915711f
commit ad66794547
9 changed files with 29 additions and 39 deletions

View File

@@ -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()