From: Stefan Csomor Date: Tue, 15 Feb 2005 05:50:48 +0000 (+0000) Subject: drawing fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ddb08e02c4f2244300ec11d3beb2fe615cbc253c drawing fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/dc.h b/include/wx/mac/carbon/dc.h index b84d255a1f..835aa3a65f 100644 --- a/include/wx/mac/carbon/dc.h +++ b/include/wx/mac/carbon/dc.h @@ -309,14 +309,14 @@ protected: void MacInstallBrush() const ; #endif - wxPoint m_macLocalOrigin ; + wxPoint m_macLocalOrigin ; mutable void* m_macATSUIStyle ; + WXHDC m_macPort ; #if wxMAC_USE_CORE_GRAPHICS // CoreGraphics wxGraphicContext * m_graphicContext ; #else - WXHDC m_macPort ; mutable bool m_macFontInstalled ; mutable bool m_macPenInstalled ; mutable bool m_macBrushInstalled ; diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index 2ead7ca3f1..d6ec8a1623 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -39,6 +39,10 @@ #define MAC_OS_X_VERSION_10_3 1030 #endif +#ifndef MAC_OS_X_VERSION_10_4 + #define MAC_OS_X_VERSION_10_4 1040 +#endif + #ifdef __WXMAC_CARBON__ #include "wx/mac/corefoundation/cfstring.h" #endif @@ -145,6 +149,26 @@ private: ThemeDrawingState m_themeDrawingState ; } ; +#if wxMAC_USE_CORE_GRAPHICS +class WXDLLEXPORT wxMacCGContextStateSaver +{ + DECLARE_NO_COPY_CLASS(wxMacCGContextStateSaver) + +public: + wxMacCGContextStateSaver( CGContextRef cg ) + { + m_cg = cg ; + CGContextSaveGState( cg ) ; + } + ~wxMacCGContextStateSaver() + { + CGContextRestoreGState( m_cg ) ; + } +private: + CGContextRef m_cg ; +} ; + +#endif /* class wxMacDrawingHelper { @@ -665,8 +689,6 @@ private : int m_maskBytesPerRow ; }; -#define M_BITMAPDATA ((wxBitmapRefData *)m_refData) - class WXDLLEXPORT wxIconRefData : public wxGDIRefData { public: @@ -676,9 +698,18 @@ public: void Init() ; virtual void Free(); + + void SetWidth( int width ) { m_width = width ; } + void SetHeight( int height ) { m_height = height ; } + + int GetWidth() const { return m_width ; } + int GetHeight() const { return m_height ; } + WXHICON GetHICON() const { return (WXHICON) m_iconRef ; } private : IconRef m_iconRef ; + int m_width ; + int m_height ; }; #endif // wxUSE_GUI