1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

LibWeb: Incorporate spread-distance into box-shadow rendering

We also pass whether the shadow goes inside or outside the element. Only
outer shadows are rendered currently, and inner ones may want to be
handled separately from them, as they will never interfere with each
other.
This commit is contained in:
Sam Atkins 2022-02-08 15:33:27 +00:00 committed by Andreas Kling
parent 10c6c77b5c
commit 103613a3a9
7 changed files with 27 additions and 12 deletions

View file

@ -11,11 +11,18 @@
namespace Web::Painting {
enum class BoxShadowPlacement {
Outer,
Inner,
};
struct BoxShadowData {
Gfx::Color color;
int offset_x;
int offset_y;
int blur_radius;
Gfx::Color color;
int spread_distance;
BoxShadowPlacement placement;
};
void paint_box_shadow(PaintContext&, Gfx::IntRect const&, Vector<BoxShadowData> const&);