From 85327e6b5d72434ccc6c8b3254cc1c44660362d3 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 7 Apr 2022 04:00:47 +0200 Subject: [PATCH] LibWeb: Fix broken AffineTransform::map() implementation When opening canvas-rotate.html on my host machine, I noticed that the rotation was going the other way.. :^) --- Userland/Libraries/LibGfx/AffineTransform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/AffineTransform.cpp b/Userland/Libraries/LibGfx/AffineTransform.cpp index 3872c9be2e..1c60eb508d 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.cpp +++ b/Userland/Libraries/LibGfx/AffineTransform.cpp @@ -142,8 +142,8 @@ Optional AffineTransform::inverse() const void AffineTransform::map(float unmapped_x, float unmapped_y, float& mapped_x, float& mapped_y) const { - mapped_x = a() * unmapped_x + b() * unmapped_y + m_values[4]; - mapped_y = c() * unmapped_x + d() * unmapped_y + m_values[5]; + mapped_x = a() * unmapped_x + c() * unmapped_y + e(); + mapped_y = b() * unmapped_x + d() * unmapped_y + f(); } template<>