mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
LibWeb: Keep both horizontal and vertical border radii till painting
This commit is contained in:
parent
2366a73474
commit
28c78b45ca
10 changed files with 133 additions and 84 deletions
|
@ -12,12 +12,18 @@
|
|||
namespace Web::Painting {
|
||||
|
||||
struct BorderRadiusData {
|
||||
float top_left { 0 };
|
||||
float top_right { 0 };
|
||||
float bottom_right { 0 };
|
||||
float bottom_left { 0 };
|
||||
float horizontal_radius { 0 };
|
||||
float vertical_radius { 0 };
|
||||
};
|
||||
BorderRadiusData normalized_border_radius_data(Layout::Node const&, Gfx::FloatRect const&, CSS::LengthPercentage top_left_radius, CSS::LengthPercentage top_right_radius, CSS::LengthPercentage bottom_right_radius, CSS::LengthPercentage bottom_left_radius);
|
||||
|
||||
struct BorderRadiiData {
|
||||
BorderRadiusData top_left;
|
||||
BorderRadiusData top_right;
|
||||
BorderRadiusData bottom_right;
|
||||
BorderRadiusData bottom_left;
|
||||
};
|
||||
|
||||
BorderRadiiData normalized_border_radii_data(Layout::Node const&, Gfx::FloatRect const&, CSS::BorderRadiusData top_left_radius, CSS::BorderRadiusData top_right_radius, CSS::BorderRadiusData bottom_right_radius, CSS::BorderRadiusData bottom_left_radius);
|
||||
|
||||
enum class BorderEdge {
|
||||
Top,
|
||||
|
@ -31,7 +37,7 @@ struct BordersData {
|
|||
CSS::BorderData bottom;
|
||||
CSS::BorderData left;
|
||||
};
|
||||
void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& rect, BorderRadiusData const& border_radius_data, BordersData const& borders_data);
|
||||
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiusData const& border_radius_data, BordersData const&);
|
||||
void paint_border(PaintContext& context, BorderEdge edge, Gfx::FloatRect const& rect, BorderRadiiData const& border_radii_data, BordersData const& borders_data);
|
||||
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiiData const& border_radii_data, BordersData const&);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue