mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
44
Libraries/LibWeb/Painting/Command.cpp
Normal file
44
Libraries/LibWeb/Painting/Command.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Painting/Command.h>
|
||||
#include <LibWeb/Painting/ShadowPainting.h>
|
||||
|
||||
namespace Web::Painting {
|
||||
|
||||
void DrawGlyphRun::translate_by(Gfx::IntPoint const& offset)
|
||||
{
|
||||
rect.translate_by(offset);
|
||||
translation.translate_by(offset.to_type<float>());
|
||||
}
|
||||
|
||||
Gfx::IntRect PaintOuterBoxShadow::bounding_rect() const
|
||||
{
|
||||
auto shadow_rect = box_shadow_params.device_content_rect;
|
||||
auto spread = box_shadow_params.blur_radius * 2 + box_shadow_params.spread_distance;
|
||||
shadow_rect.inflate(spread, spread, spread, spread);
|
||||
auto offset_x = box_shadow_params.offset_x;
|
||||
auto offset_y = box_shadow_params.offset_y;
|
||||
shadow_rect.translate_by(offset_x, offset_y);
|
||||
return shadow_rect;
|
||||
}
|
||||
|
||||
Gfx::IntRect PaintInnerBoxShadow::bounding_rect() const
|
||||
{
|
||||
return box_shadow_params.device_content_rect;
|
||||
}
|
||||
|
||||
void PaintOuterBoxShadow::translate_by(Gfx::IntPoint const& offset)
|
||||
{
|
||||
box_shadow_params.device_content_rect.translate_by(offset);
|
||||
}
|
||||
|
||||
void PaintInnerBoxShadow::translate_by(Gfx::IntPoint const& offset)
|
||||
{
|
||||
box_shadow_params.device_content_rect.translate_by(offset);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue