X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0eaa1d68c29cd273971be9d60008045e470c2d46..e640f8231fbf0417f9ab5d378e7f218587cb6ac2:/include/wx/mac/dc.h diff --git a/include/wx/mac/dc.h b/include/wx/mac/dc.h index 9bdbaaf9f1..ea40eaec03 100644 --- a/include/wx/mac/dc.h +++ b/include/wx/mac/dc.h @@ -51,7 +51,7 @@ extern int wxPageNumber; class WXDLLEXPORT wxMacPortSetter { public : - wxMacPortSetter( wxDC* dc ) ; + wxMacPortSetter( const wxDC* dc ) ; ~wxMacPortSetter() ; private : AGAPortHelper m_ph ; @@ -72,7 +72,7 @@ class WXDLLEXPORT wxDC: public wxDCBase virtual void Clear(); - virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }; + virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; } virtual void EndDoc(void) {}; virtual void StartPage(void) {}; @@ -177,6 +177,7 @@ class WXDLLEXPORT wxDC: public wxDCBase return (wxCoord)((double)(y) * m_scaleY - 0.5); } + RgnHandle MacGetCurrentClipRgn() { return m_macCurrentClipRgn ; } // protected: @@ -213,7 +214,7 @@ protected: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - int rop = wxCOPY, bool useMask = FALSE); + int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); // this is gnarly - we can't even call this function DoSetClippingRegion() // because of virtual function hiding @@ -235,21 +236,22 @@ protected: wxCoord xoffset, wxCoord yoffset, int fillStyle = wxODDEVEN_RULE); - - -// - - public: -//begin wxmac + protected: + //begin wxmac + // Variables used for scaling double m_mm_to_pix_x,m_mm_to_pix_y; - bool m_needComputeScaleX,m_needComputeScaleY; // not yet used - long m_internalDeviceOriginX,m_internalDeviceOriginY; // If un-scrolled is non-zero or - // d.o. changes with scrolling. - // Set using SetInternalDeviceOrigin(). + // not yet used + bool m_needComputeScaleX,m_needComputeScaleY; + // If un-scrolled is non-zero or d.o. changes with scrolling. + // Set using SetInternalDeviceOrigin(). + long m_internalDeviceOriginX,m_internalDeviceOriginY; + // To be set by external classes such as wxScrolledWindow + // using SetDeviceOrigin() + long m_externalDeviceOriginX,m_externalDeviceOriginY; + + // Begin implementation for Mac + public: - long m_externalDeviceOriginX,m_externalDeviceOriginY; // To be set by external classes - // such as wxScrolledWindow - // using SetDeviceOrigin() GrafPtr m_macPort ; GWorldPtr m_macMask ; @@ -264,7 +266,8 @@ protected: mutable bool m_macPenInstalled ; mutable bool m_macBrushInstalled ; - Rect m_macClipRect ; + RgnHandle m_macBoundaryClipRgn ; + RgnHandle m_macCurrentClipRgn ; Point m_macLocalOrigin ; void MacSetupPort( AGAPortHelper* ph ) const ; };