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

LibWeb: Add DOMMatrix fromFloat32Array and fromFloat64Array

This commit is contained in:
Bastiaan van der Plaat 2023-09-25 22:11:30 +02:00 committed by Andrew Kaster
parent 2e122b16e4
commit 3c27843cfe
9 changed files with 146 additions and 13 deletions

View file

@ -56,6 +56,8 @@ public:
virtual ~DOMMatrixReadOnly() override;
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> from_matrix(JS::VM&, DOMMatrixInit& other);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> from_float32_array(JS::VM&, JS::Handle<JS::Object> const& array32);
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> from_float64_array(JS::VM&, JS::Handle<JS::Object> const& array64);
// https://drafts.fxtf.org/geometry/#dommatrix-attributes
double m11() const { return m_matrix.elements()[0][0]; }