mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 22:29:10 +00:00
LibGfx: Add ability to draw inverted rectangles
This commit is contained in:
parent
c460f4a3cb
commit
607c78336b
Notes:
sideshowbarker
2024-07-19 02:50:53 +09:00
Author: https://github.com/tomuta
Commit: 607c78336b
Pull-request: https://github.com/SerenityOS/serenity/pull/3435
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