mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibGfx: Rename Color::from_rgba() => Color::from_argb()
This matches the rename of RGBA32 to ARGB32. It also makes more sense when you see it used with 32-bit hexadecimal literals: Before: Color::from_rgba(0xaarrggbb) After: Color::from_argb(0xaarrggbb)
This commit is contained in:
parent
5ace66a903
commit
a6a8ba80fc
11 changed files with 38 additions and 38 deletions
|
@ -207,7 +207,7 @@ public:
|
|||
[[nodiscard]] static constexpr size_t size_in_bytes(size_t pitch, int physical_height) { return pitch * physical_height; }
|
||||
[[nodiscard]] size_t size_in_bytes() const { return size_in_bytes(m_pitch, physical_height()); }
|
||||
|
||||
[[nodiscard]] Color palette_color(u8 index) const { return Color::from_rgba(m_palette[index]); }
|
||||
[[nodiscard]] Color palette_color(u8 index) const { return Color::from_argb(m_palette[index]); }
|
||||
void set_palette_color(u8 index, Color color) { m_palette[index] = color.value(); }
|
||||
|
||||
template<StorageFormat>
|
||||
|
@ -289,7 +289,7 @@ template<>
|
|||
inline Color Bitmap::get_pixel<StorageFormat::BGRA8888>(int x, int y) const
|
||||
{
|
||||
VERIFY(x >= 0 && x < physical_width());
|
||||
return Color::from_rgba(scanline(y)[x]);
|
||||
return Color::from_argb(scanline(y)[x]);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue