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:
parent
c460f4a3cb
commit
607c78336b
3 changed files with 52 additions and 11 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue