struct

Lottie::Matrix

Inherits Struct < Value < Object

Affine 2×3: x' = m00·x + m01·y + tx, y' = m10·x + m11·y + ty.

Constructors

from_transform(t : Transform, frame : Float64) : Matrix

Lottie layer/group transform: T(p) · R(r) · S(s) · T(−a).

Source
identity
Source
new(m00 : Float64 = 1.0, m01 : Float64 = 0.0, m10 : Float64 = 0.0, m11 : Float64 = 1.0, tx : Float64 = 0.0, ty : Float64 = 0.0)
Source

Instance methods

apply(x : Float64, y : Float64) : Vec2
Source
avg_scale

VMatrix::scale(): maps (0,0) and (√2,√2), halving the distance — the average scale factor of the transform. The constant is rlottie's 1.41421f (NOT the exact √2 — the difference lands in the dump's cradius), arithmetic in Float32 like the original.

Source
multiply(o : Matrix) : Matrix

self ∘ other (apply other first, then self).

Source