drawing fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2005-02-15 05:50:48 +00:00
parent 92cd4cf182
commit ddb08e02c4
2 changed files with 35 additions and 4 deletions

View File

@@ -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 ;

View File

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