summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Wilde <lukew@serenityos.org>2023-04-06 16:37:23 +0100
committerAndreas Kling <kling@serenityos.org>2023-04-06 17:45:07 +0200
commitcb62ffbb8a75d926fa45105ff114390ece0530dd (patch)
tree83d5ac61009960204aa31a9526c070ac9cd52325
parentb97229c9b5927fa7b43777aefae769fc4d2a0834 (diff)
downloadserenity-cb62ffbb8a75d926fa45105ff114390ece0530dd.zip
LibWeb: Transform the default path in CRC2D#fill(CanvasFillRule)
Required by Factory Balls Forever to position anything that isn't an image.
-rw-r--r--Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
index c42f8d995f..07cb8a5bc1 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp
@@ -288,7 +288,8 @@ void CanvasRenderingContext2D::fill_internal(Gfx::Path& path, DeprecatedString c
void CanvasRenderingContext2D::fill(DeprecatedString const& fill_rule)
{
- return fill_internal(path(), fill_rule);
+ auto transformed_path = path().copy_transformed(drawing_state().transform);
+ return fill_internal(transformed_path, fill_rule);
}
void CanvasRenderingContext2D::fill(Path2D& path, DeprecatedString const& fill_rule)