mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibWeb: Move background painting from 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
b047c1bc97
commit
abc22b727c
5 changed files with 86 additions and 49 deletions
25
Userland/Libraries/LibWeb/Painting/BackgroundPainting.h
Normal file
25
Userland/Libraries/LibWeb/Painting/BackgroundPainting.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibWeb/CSS/StyleValue.h>
|
||||
#include <LibWeb/Painting/BorderPainting.h>
|
||||
#include <LibWeb/Painting/PaintContext.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
struct BackgroundData {
|
||||
Color color;
|
||||
Gfx::Bitmap const* image;
|
||||
CSS::Repeat repeat_x;
|
||||
CSS::Repeat repeat_y;
|
||||
};
|
||||
|
||||
void paint_background(PaintContext&, Gfx::IntRect const&, BackgroundData const&, BorderRadiusData const&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue