X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/519cb848a8f4c91c73421bb75314754284e593a4..ee6b1d97e741fda8d579fa21cbc89f0c91615cef:/src/mac/carbon/dcclient.cpp?ds=sidebyside diff --git a/src/mac/carbon/dcclient.cpp b/src/mac/carbon/dcclient.cpp index 08aeff0504..6f3a6b3517 100644 --- a/src/mac/carbon/dcclient.cpp +++ b/src/mac/carbon/dcclient.cpp @@ -40,11 +40,11 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC) #include -wxWindowDC::wxWindowDC(void) +wxWindowDC::wxWindowDC() { } -wxWindowDC::wxWindowDC(wxWindow *the_canvas) +wxWindowDC::wxWindowDC(wxWindow *the_canvas) { WindowRef windowref ; wxWindow* rootwindow ; @@ -53,11 +53,16 @@ wxWindowDC::wxWindowDC(wxWindow *the_canvas) the_canvas->MacGetPortParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); m_macPort = UMAGetWindowPort( windowref ) ; + m_minY = m_minX = 0; + wxSize size = the_canvas->GetSize() ; + m_maxX = size.x ; + m_maxY = size.y ; + MacSetupPort() ; m_ok = TRUE ; } -wxWindowDC::~wxWindowDC(void) +wxWindowDC::~wxWindowDC() { } @@ -65,7 +70,7 @@ wxWindowDC::~wxWindowDC(void) * wxClientDC */ -wxClientDC::wxClientDC(void) +wxClientDC::wxClientDC() { } @@ -77,12 +82,16 @@ wxClientDC::wxClientDC(wxWindow *window) window->MacGetPortClientParams(&m_macLocalOrigin, &m_macClipRect , &windowref , &rootwindow ); m_macPort = UMAGetWindowPort( windowref ) ; MacSetupPort() ; + m_minY = m_minX = 0; + wxSize size = window->GetSize() ; + m_maxX = size.x ; + m_maxY = size.y ; m_ok = TRUE ; - SetBackground(wxBrush(window->GetBackgroundColour(), wxSOLID)); - + SetBackground(wxBrush(window->GetBackgroundColour(), wxSOLID)); + SetFont( window->GetFont() ) ; } -wxClientDC::~wxClientDC(void) +wxClientDC::~wxClientDC() { } @@ -90,7 +99,7 @@ wxClientDC::~wxClientDC(void) * wxPaintDC */ -wxPaintDC::wxPaintDC(void) +wxPaintDC::wxPaintDC() { } @@ -106,8 +115,13 @@ wxPaintDC::wxPaintDC(wxWindow *window) m_ok = TRUE ; long x , y ,w , h ; window->GetUpdateRegion().GetBox( x , y , w , h ) ; + m_minY = m_minX = 0; + wxSize size = window->GetSize() ; + m_maxX = size.x ; + m_maxY = size.y ; SetClippingRegion( x , y , w , h ) ; SetBackground(wxBrush(window->GetBackgroundColour(), wxSOLID)); + SetFont(window->GetFont() ) ; } wxPaintDC::~wxPaintDC()