mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibGfx: Support alpha in rendering methods for border-radius
The methods used in displaying border-radius were ignoring alpha.
This commit is contained in:
parent
e16a50b586
commit
155d876c44
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue