From 0e88f17166718a67566ab281afb3afad5778b9cb Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 21 Oct 2007 18:04:40 +0000 Subject: [PATCH] factoring color representation on mac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/carbon/private.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index 8f9ca83115..946809e9f2 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -1128,6 +1128,26 @@ public: // graphics implementation // ============================================================================ +// make sure we all use one class for all conversions from wx to native colour + +class wxMacCoreGraphicsColour +{ +public: + wxMacCoreGraphicsColour(); + wxMacCoreGraphicsColour(const wxBrush &brush); + ~wxMacCoreGraphicsColour(); + + void Apply( CGContextRef cgContext ); +protected: + void Init(); + wxMacCFRefHolder m_color; + wxMacCFRefHolder m_colorSpace; + + bool m_isPattern; + wxMacCFRefHolder m_pattern; + CGFloat* m_patternColorComponents; +} ; + #if wxMAC_USE_CORE_GRAPHICS && !wxUSE_GRAPHICS_CONTEXT class WXDLLEXPORT wxMacCGPath : public wxGraphicPath