1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibWeb: Produce a transformation matrix for TransformFunction::Rotate

Currently we can't actually paint the result, but at least the maths is
correct. :^)
This commit is contained in:
Sam Atkins 2022-07-21 14:29:47 +01:00 committed by Andreas Kling
parent b5ab961e20
commit 032646b6c3

View file

@ -247,6 +247,10 @@ Gfx::FloatMatrix4x4 StackingContext::get_transformation_matrix(CSS::Transformati
0, 0, 1, 0,
0, 0, 0, 1);
break;
case CSS::TransformFunction::Rotate:
if (count == 1)
return Gfx::rotation_matrix({ 0.0f, 0.0f, 1.0f }, value(0));
break;
default:
dbgln_if(LIBWEB_CSS_DEBUG, "FIXME: Unhandled transformation function {}", CSS::TransformationStyleValue::create(transformation.function, {})->to_string());
}