Adding IsSolid to wxColour

Under macOS colors can be patterns, then accessors for RGB values are useless, IsSolid returns true if the color can be expressed in RGB values at all.
This commit is contained in:
Stefan Csomor
2018-10-30 20:53:35 +01:00
parent 3ab2bfd62a
commit 9a05410470
5 changed files with 28 additions and 1 deletions

View File

@@ -34,6 +34,8 @@ public:
virtual ChannelType Blue() const wxOVERRIDE;
virtual ChannelType Alpha() const wxOVERRIDE;
virtual bool IsSolid() const wxOVERRIDE;
wxColour& operator=(const wxColour& col);
// comparison
@@ -90,7 +92,10 @@ public:
virtual CGFloat Green() const = 0;
virtual CGFloat Blue() const = 0;
virtual CGFloat Alpha() const = 0;
virtual bool IsSolid() const
{ return true; }
virtual CGColorRef GetCGColor() const = 0;
virtual wxColourRefData* Clone() const = 0;