From 115563867dac8edf57b6d2c6ae95910c7f277d77 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 22 Nov 2007 17:47:10 +0000 Subject: [PATCH] mac cgcolor changes & cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/brush.h | 4 ++-- include/wx/mac/carbon/metafile.h | 2 ++ include/wx/mac/carbon/private.h | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/wx/mac/carbon/brush.h b/include/wx/mac/carbon/brush.h index ae73a725dd..6f6bbb4ba6 100644 --- a/include/wx/mac/carbon/brush.h +++ b/include/wx/mac/carbon/brush.h @@ -42,7 +42,7 @@ public: virtual void SetStyle(int style) ; virtual void SetStipple(const wxBitmap& stipple) ; virtual void MacSetTheme(short macThemeBrush) ; - virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ; +// TODO REMOVE virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ; bool operator == (const wxBrush& brush) const; bool operator != (const wxBrush& brush) const @@ -50,7 +50,7 @@ public: wxMacBrushKind MacGetBrushKind() const ; - unsigned long MacGetThemeBackground(WXRECTPTR extent) const ; +// TODO REMOVE unsigned long MacGetThemeBackground(WXRECTPTR extent) const ; short MacGetTheme() const ; wxColour& GetColour() const ; virtual int GetStyle() const ; diff --git a/include/wx/mac/carbon/metafile.h b/include/wx/mac/carbon/metafile.h index d005640506..21ee5672d4 100644 --- a/include/wx/mac/carbon/metafile.h +++ b/include/wx/mac/carbon/metafile.h @@ -57,10 +57,12 @@ public: // Implementation WXHMETAFILE GetHMETAFILE() const ; void SetHMETAFILE(WXHMETAFILE mf) ; +#ifndef __LP64__ // Since the native metafile format is PDF for Quartz // we need a call that allows setting PICT content for // backwards compatibility void SetPICT(void* pictHandle) ; +#endif }; class WXDLLEXPORT wxMetafileDC: public wxDC diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index 48bd4c4dc2..9b00f047df 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -438,7 +438,6 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi void wxMacReleaseBitmapButton( ControlButtonContentInfo*info ); CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap ); -#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a))) #define MAC_WXHBITMAP(a) (GWorldPtr(a)) #define MAC_WXHMETAFILE(a) (PicHandle(a)) #define MAC_WXHICON(a) (IconRef(a)) @@ -1073,6 +1072,13 @@ public: // graphics implementation // ============================================================================ +// draw the image 'upside down' corrected as HIViewDrawCGImage does + +OSStatus WXDLLEXPORT wxMacDrawCGImage( + CGContextRef inContext, + const HIRect * inBounds, + CGImageRef inImage) ; + // make sure we all use one class for all conversions from wx to native colour class wxMacCoreGraphicsColour -- 2.45.2