mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/Geometry: Add a method to multiply a DOMMatrix by a DOMMatrix
This will be needed by CSSTransformValue.
This commit is contained in:
parent
d3d695e9d2
commit
3269937e6d
|
|
@ -399,6 +399,14 @@ WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> DOMMatrix::multiply_self(DOMMatrixInit o
|
|||
return GC::Ref<DOMMatrix>(*this);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> DOMMatrix::multiply_self(GC::Ref<DOMMatrix> other)
|
||||
{
|
||||
m_matrix = m_matrix * other->m_matrix;
|
||||
if (!other->m_is_2d)
|
||||
m_is_2d = false;
|
||||
return GC::Ref<DOMMatrix>(*this);
|
||||
}
|
||||
|
||||
// https://drafts.fxtf.org/geometry/#dom-dommatrix-premultiplyself
|
||||
WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> DOMMatrix::pre_multiply_self(DOMMatrixInit other)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public:
|
|||
void set_f(double value);
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> multiply_self(DOMMatrixInit other = {});
|
||||
WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> multiply_self(GC::Ref<DOMMatrix>);
|
||||
WebIDL::ExceptionOr<GC::Ref<DOMMatrix>> pre_multiply_self(DOMMatrixInit other = {});
|
||||
GC::Ref<DOMMatrix> translate_self(Optional<double> tx, Optional<double> ty, Optional<double> tz);
|
||||
GC::Ref<DOMMatrix> scale_self(Optional<double> scale_x, Optional<double> scale_y, Optional<double> scale_z, Optional<double> origin_x, Optional<double> origin_y, Optional<double> origin_z);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user