From 3ad02ff31705ff568db2ec87244f2c0214112f9b Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 3 May 2021 08:20:04 +1000 Subject: Rename Opaque to WithoutAlpha as it returns a colour with 0 alpha. New Opaque method returns a colour with maximum (0xff) alpha. --- src/Geometry.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Geometry.h b/src/Geometry.h index b4d10f496..bf8f4096e 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -179,10 +179,14 @@ public: return ColourAlpha(co_ | (0xffu << 24)); } - constexpr ColourAlpha Opaque() const noexcept { + constexpr ColourAlpha WithoutAlpha() const noexcept { return ColourAlpha(co & 0xffffff); } + constexpr ColourAlpha Opaque() const noexcept { + return ColourAlpha(co | (0xffu << 24)); + } + constexpr int OpaqueRGB() const noexcept { return co & 0xffffff; } -- cgit v1.2.3