mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-26 01:50:08 +00:00
LibWeb: Take transforms into account when drawing shadows
This commit is contained in:
parent
0516c414d4
commit
0f295e8989
Notes:
github-actions[bot]
2025-10-21 16:56:35 +00:00
Author: https://github.com/tcl3
Commit: 0f295e8989
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6530
Reviewed-by: https://github.com/gmta ✅
5 changed files with 82 additions and 0 deletions
|
|
@ -1084,6 +1084,7 @@ void CanvasRenderingContext2D::paint_shadow_for_fill_internal(Gfx::Path const& p
|
|||
|
||||
Gfx::AffineTransform transform;
|
||||
transform.translate(state.shadow_offset_x, state.shadow_offset_y);
|
||||
transform.multiply(state.transform);
|
||||
painter->set_transform(transform);
|
||||
painter->fill_path(path, state.shadow_color.with_opacity(alpha), winding_rule, state.shadow_blur, state.current_compositing_and_blending_operator);
|
||||
|
||||
|
|
@ -1120,6 +1121,7 @@ void CanvasRenderingContext2D::paint_shadow_for_stroke_internal(Gfx::Path const&
|
|||
|
||||
Gfx::AffineTransform transform;
|
||||
transform.translate(state.shadow_offset_x, state.shadow_offset_y);
|
||||
transform.multiply(state.transform);
|
||||
painter->set_transform(transform);
|
||||
painter->stroke_path(path, state.shadow_color.with_opacity(alpha), state.line_width, state.shadow_blur, state.current_compositing_and_blending_operator);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue