1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 06:45:07 +00:00
serenity/Userland/Libraries/LibWeb/Painting/ShadowPainting.h
Sam Atkins 103613a3a9 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.
2022-02-08 17:45:51 +01:00

30 lines
542 B
C++

/*
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Color.h>
#include <LibWeb/Painting/PaintContext.h>
namespace Web::Painting {
enum class BoxShadowPlacement {
Outer,
Inner,
};
struct BoxShadowData {
Gfx::Color color;
int offset_x;
int offset_y;
int blur_radius;
int spread_distance;
BoxShadowPlacement placement;
};
void paint_box_shadow(PaintContext&, Gfx::IntRect const&, Vector<BoxShadowData> const&);
}