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
commit 607c78336b
Notes: sideshowbarker 2024-07-19 02:50:53 +09:00
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; }