1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:17:45 +00:00

LibGfx: Rename RGBA32 => ARGB32

The ARGB32 typedef is used for 32-bit #AARRGGBB quadruplets. As such,
the name RGBA32 was misleading, so let's call it ARGB32 instead.

Since endianness is a thing, let's not encode any assumptions about byte
order in the name of this type. ARGB32 is basically a "machine word"
of color.
This commit is contained in:
Andreas Kling 2022-03-04 22:05:20 +01:00
parent 5c4bb03926
commit 5ace66a903
14 changed files with 84 additions and 84 deletions

View file

@ -17,7 +17,7 @@
namespace Gfx {
enum class ColorRole;
typedef u32 RGBA32;
typedef u32 ARGB32;
struct HSV {
double hue { 0 };
@ -277,7 +277,7 @@ public:
return Color(((other.m_value ^ m_value) & 0x00ffffff) | (m_value & 0xff000000));
}
constexpr RGBA32 value() const { return m_value; }
constexpr ARGB32 value() const { return m_value; }
constexpr bool operator==(Color const& other) const
{
@ -399,12 +399,12 @@ public:
}
private:
constexpr explicit Color(RGBA32 rgba)
constexpr explicit Color(ARGB32 rgba)
: m_value(rgba)
{
}
RGBA32 m_value { 0 };
ARGB32 m_value { 0 };
};
constexpr Color::Color(NamedColor named)