Use an enum for the colour/string conversion flags
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66249 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,10 +35,11 @@ class WXDLLIMPEXP_FWD_CORE wxColour;
|
|||||||
|
|
||||||
|
|
||||||
// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
|
// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
|
||||||
#define wxC2S_NAME 1 // return colour name, when possible
|
enum {
|
||||||
#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
|
wxC2S_NAME = 1, // return colour name, when possible
|
||||||
#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
|
wxC2S_CSS_SYNTAX = 2, // return colour in rgb(r,g,b) syntax
|
||||||
|
wxC2S_HTML_SYNTAX = 4 // return colour in #rrggbb syntax
|
||||||
|
};
|
||||||
|
|
||||||
const unsigned char wxALPHA_TRANSPARENT = 0;
|
const unsigned char wxALPHA_TRANSPARENT = 0;
|
||||||
const unsigned char wxALPHA_OPAQUE = 0xff;
|
const unsigned char wxALPHA_OPAQUE = 0xff;
|
||||||
|
@@ -13,12 +13,16 @@
|
|||||||
|
|
||||||
@{
|
@{
|
||||||
*/
|
*/
|
||||||
#define wxC2S_NAME 1 //!< Return colour name, when possible.
|
enum {
|
||||||
#define wxC2S_CSS_SYNTAX 2 //!< Return colour in "rgb(r,g,b)" syntax.
|
wxC2S_NAME = 1, // return colour name, when possible
|
||||||
#define wxC2S_HTML_SYNTAX 4 //!< Return colour in "#rrggbb" syntax.
|
wxC2S_CSS_SYNTAX = 2, // return colour in rgb(r,g,b) syntax
|
||||||
|
wxC2S_HTML_SYNTAX = 4 // return colour in #rrggbb syntax
|
||||||
|
};
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
const unsigned char wxALPHA_TRANSPARENT = 0;
|
||||||
|
const unsigned char wxALPHA_OPAQUE = 0xff;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxColour
|
@class wxColour
|
||||||
@@ -78,6 +82,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxColour(const wxString& colourName);
|
wxColour(const wxString& colourName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
@param colRGB
|
||||||
|
A packed RGB value.
|
||||||
|
*/
|
||||||
|
wxColour(unsigned long colRGB);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Copy constructor.
|
Copy constructor.
|
||||||
*/
|
*/
|
||||||
@@ -155,7 +165,7 @@ public:
|
|||||||
On X, an allocated pixel value is returned.
|
On X, an allocated pixel value is returned.
|
||||||
If the pixel is invalid (on X, unallocated), @c -1 is returned.
|
If the pixel is invalid (on X, unallocated), @c -1 is returned.
|
||||||
*/
|
*/
|
||||||
int GetPixel() const;
|
wxIntPtr GetPixel() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the green intensity.
|
Returns the green intensity.
|
||||||
|
Reference in New Issue
Block a user