diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-03 08:20:04 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-03 08:20:04 +1000 |
commit | 3ad02ff31705ff568db2ec87244f2c0214112f9b (patch) | |
tree | 4749bfae14109e4dc8752e00177400126bbd53f5 /src/Geometry.h | |
parent | 93591238af8bf8b5246adcfe7a115f443442f44e (diff) | |
download | scintilla-mirror-3ad02ff31705ff568db2ec87244f2c0214112f9b.tar.gz |
Rename Opaque to WithoutAlpha as it returns a colour with 0 alpha. New Opaque
method returns a colour with maximum (0xff) alpha.
Diffstat (limited to 'src/Geometry.h')
-rw-r--r-- | src/Geometry.h | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |