From cb62ffbb8a75d926fa45105ff114390ece0530dd Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Thu, 6 Apr 2023 16:37:23 +0100 Subject: LibWeb: Transform the default path in CRC2D#fill(CanvasFillRule) Required by Factory Balls Forever to position anything that isn't an image. --- Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3