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

LibGfx: Add ability to draw inverted rectangles

This commit is contained in:
Tom 2020-09-07 22:25:30 -06:00 committed by Andreas Kling
parent c460f4a3cb
commit 607c78336b
3 changed files with 52 additions and 11 deletions

View file

@ -156,7 +156,12 @@ public:
Color inverted() const
{
return Color(~red(), ~green(), ~blue());
return Color(~red(), ~green(), ~blue(), alpha());
}
Color xored(const Color& other) const
{
return Color(((other.m_value ^ m_value) & 0x00ffffff) | (m_value & 0xff000000));
}
RGBA32 value() const { return m_value; }