diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-07-21 14:29:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-21 16:36:08 +0200 |
commit | 032646b6c3bac74944884337cfbe7cad382baef1 (patch) | |
tree | b2b6e6c261910a671c3db346c452a1fa0079f814 /Userland/Libraries/LibWeb/Painting | |
parent | b5ab961e20acb5b53f8b6078cbc39d81d9061980 (diff) | |
download | serenity-032646b6c3bac74944884337cfbe7cad382baef1.zip |
LibWeb: Produce a transformation matrix for TransformFunction::Rotate
Currently we can't actually paint the result, but at least the maths is
correct. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index 9fd827a260..c205b6a23a 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -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()); } |