From a69aabc360d54a93e355fab72c6513c75aaa7337 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 26 Aug 2006 16:16:16 +0000 Subject: [PATCH] adding constants git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/colour.h | 6 ++++-- include/wx/mac/carbon/colour.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/wx/colour.h b/include/wx/colour.h index 8b9e828c4c..807fbfd68c 100644 --- a/include/wx/colour.h +++ b/include/wx/colour.h @@ -36,6 +36,8 @@ class WXDLLEXPORT wxColour; +const unsigned char wxALPHA_TRANSPARENT = 0; +const unsigned char wxALPHA_OPAQUE = 0xff; //----------------------------------------------------------------------------- // wxColourBase: this class has no data members, just some functions to avoid @@ -64,7 +66,7 @@ public: // Set() functions // --------------- - void Set(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = 255) + void Set(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = wxALPHA_OPAQUE) { InitWith(red,green,blue, alpha); } // implemented in colourcmn.cpp @@ -94,7 +96,7 @@ public: virtual unsigned char Green() const = 0; virtual unsigned char Blue() const = 0; virtual unsigned char Alpha() const - { return 255 ; } + { return wxALPHA_OPAQUE ; } // implemented in colourcmn.cpp virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const; diff --git a/include/wx/mac/carbon/colour.h b/include/wx/mac/carbon/colour.h index 24bdf83813..2cad2126ee 100644 --- a/include/wx/mac/carbon/colour.h +++ b/include/wx/mac/carbon/colour.h @@ -57,7 +57,7 @@ protected : void InitWith( unsigned char red, unsigned char green, unsigned char blue ) { - InitWith( red, green, blue , 255) ; + InitWith( red, green, blue , wxALPHA_OPAQUE ) ; } void InitWith( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha );