X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c74e7fe1de14f32dcd6f3c9cdd727de540bbd0e..1f3943e0276719ed5fc94bb93765df69f91ba10c:/src/mac/dcclient.cpp?ds=inline diff --git a/src/mac/dcclient.cpp b/src/mac/dcclient.cpp index b4155b572d..92cb39201b 100644 --- a/src/mac/dcclient.cpp +++ b/src/mac/dcclient.cpp @@ -16,6 +16,7 @@ #include "wx/dcclient.h" #include "wx/dcmemory.h" #include "wx/region.h" +#include "wx/window.h" #include //----------------------------------------------------------------------------- @@ -40,11 +41,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 +54,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 +71,7 @@ wxWindowDC::~wxWindowDC(void) * wxClientDC */ -wxClientDC::wxClientDC(void) +wxClientDC::wxClientDC() { } @@ -77,12 +83,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)); SetFont( window->GetFont() ) ; } -wxClientDC::~wxClientDC(void) +wxClientDC::~wxClientDC() { } @@ -90,7 +100,7 @@ wxClientDC::~wxClientDC(void) * wxPaintDC */ -wxPaintDC::wxPaintDC(void) +wxPaintDC::wxPaintDC() { } @@ -104,8 +114,12 @@ wxPaintDC::wxPaintDC(wxWindow *window) m_macPort = UMAGetWindowPort( windowref ) ; MacSetupPort() ; m_ok = TRUE ; - long x , y ,w , h ; + wxCoord 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() ) ;