mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
LibWeb: Move box-shadow painting out of Box to its own file
This makes the code accessible to things that aren't a Box, such as InlineNode.
This commit is contained in:
parent
3b6325e787
commit
b047c1bc97
4 changed files with 83 additions and 37 deletions
22
Userland/Libraries/LibWeb/Painting/ShadowPainting.h
Normal file
22
Userland/Libraries/LibWeb/Painting/ShadowPainting.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGfx/Forward.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
struct BoxShadowData {
|
||||
int offset_x;
|
||||
int offset_y;
|
||||
int blur_radius;
|
||||
Gfx::Color color;
|
||||
};
|
||||
|
||||
void paint_box_shadow(PaintContext&, Gfx::IntRect const&, BoxShadowData const&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue