From 103613a3a933a0213c88064f65b1d3e5ab48ec3b Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 8 Feb 2022 15:33:27 +0000 Subject: 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. --- Userland/Libraries/LibWeb/Painting/ShadowPainting.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/Painting/ShadowPainting.h') diff --git a/Userland/Libraries/LibWeb/Painting/ShadowPainting.h b/Userland/Libraries/LibWeb/Painting/ShadowPainting.h index 4484a76f8c..9c46f56679 100644 --- a/Userland/Libraries/LibWeb/Painting/ShadowPainting.h +++ b/Userland/Libraries/LibWeb/Painting/ShadowPainting.h @@ -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 const&); -- cgit v1.2.3