diff options
author | Tobias Christiansen <tobi@tobyase.de> | 2021-05-22 00:15:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-22 00:21:02 +0200 |
commit | 155d876c44d3846e8a1bf27f05a3e0a174490490 (patch) | |
tree | ae9f2ae1f08dcb21be0fa370af30d68f65fae153 /Userland | |
parent | e16a50b58667f130995a392804ed63c0b834bb77 (diff) | |
download | serenity-155d876c44d3846e8a1bf27f05a3e0a174490490.zip |
LibGfx: Support alpha in rendering methods for border-radius
The methods used in displaying border-radius were ignoring alpha.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/Painter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 89bec0cf58..6fc5ca1c9c 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -379,7 +379,7 @@ void Painter::fill_rounded_corner(const IntRect& a_rect, int radius, Color color for (int i = rect.height() - 1; i >= 0; --i) { for (int j = 0; j < rect.width(); ++j) if (is_in_circle(j, rect.height() - i + clip_offset)) - dst[j] = color.value(); + dst[j] = Color::from_rgba(dst[j]).blend(color).value(); dst += dst_skip; } } @@ -420,7 +420,7 @@ void Painter::draw_circle_arc_intersecting(const IntRect& a_rect, const IntPoint for (int i = rect.height() - 1; i >= 0; --i) { for (int j = 0; j < rect.width(); ++j) if (is_on_arc(j, rect.height() - i + clip_offset)) - dst[j] = color.value(); + dst[j] = Color::from_rgba(dst[j]).blend(color).value(); dst += dst_skip; } |