/src/serenity/Userland/Libraries/LibWeb/Painting/Command.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibWeb/Painting/Command.h> |
8 | | #include <LibWeb/Painting/ShadowPainting.h> |
9 | | |
10 | | namespace Web::Painting { |
11 | | |
12 | | void DrawGlyphRun::translate_by(Gfx::IntPoint const& offset) |
13 | 0 | { |
14 | 0 | rect.translate_by(offset); |
15 | 0 | translation.translate_by(offset.to_type<float>()); |
16 | 0 | } |
17 | | |
18 | | Gfx::IntRect PaintOuterBoxShadow::bounding_rect() const |
19 | 0 | { |
20 | 0 | return get_outer_box_shadow_bounding_rect(box_shadow_params); |
21 | 0 | } |
22 | | |
23 | | Gfx::IntRect PaintInnerBoxShadow::bounding_rect() const |
24 | 0 | { |
25 | 0 | return box_shadow_params.device_content_rect; |
26 | 0 | } |
27 | | |
28 | | void PaintOuterBoxShadow::translate_by(Gfx::IntPoint const& offset) |
29 | 0 | { |
30 | 0 | box_shadow_params.device_content_rect.translate_by(offset); |
31 | 0 | } |
32 | | |
33 | | void PaintInnerBoxShadow::translate_by(Gfx::IntPoint const& offset) |
34 | 0 | { |
35 | 0 | box_shadow_params.device_content_rect.translate_by(offset); |
36 | 0 | } |
37 | | |
38 | | } |