aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Geometry.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Geometry.h')
-rw-r--r--src/Geometry.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Geometry.h b/src/Geometry.h
index a9daa5516..d02a25bbb 100644
--- a/src/Geometry.h
+++ b/src/Geometry.h
@@ -182,7 +182,7 @@ public:
constexpr explicit ColourRGBA(int co_ = 0) noexcept : co(co_) {
}
- constexpr ColourRGBA(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha= maximumByte) noexcept :
+ constexpr ColourRGBA(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha=maximumByte) noexcept :
ColourRGBA(red | (green << 8) | (blue << 16) | (alpha << 24)) {
}
@@ -194,6 +194,10 @@ public:
return ColourRGBA(co_ | (maximumByte << 24));
}
+ static constexpr ColourRGBA Grey(unsigned int grey, unsigned int alpha=maximumByte) noexcept {
+ return ColourRGBA(grey, grey, grey, alpha);
+ }
+
static constexpr ColourRGBA FromIpRGB(intptr_t co_) noexcept {
const int rgb = co_ & rgbMask;
return ColourRGBA(rgb | (maximumByte << 24));