diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-02-08 15:33:27 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-08 17:45:51 +0100 |
commit | 103613a3a933a0213c88064f65b1d3e5ab48ec3b (patch) | |
tree | e25fbe7b0faf1f749e8353e8d7028653f8b8b112 /Userland/Libraries/LibWeb/Painting/ShadowPainting.h | |
parent | 10c6c77b5c252ac88a5411b8188b8ee4ed190827 (diff) | |
download | serenity-103613a3a933a0213c88064f65b1d3e5ab48ec3b.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/ShadowPainting.h')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/ShadowPainting.h | 9 |
1 files changed, 8 insertions, 1 deletions
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<BoxShadowData> const&); |