class

Transform

@Js
@Serializable { simple=true }
const class Transform : Obj

Transform models an affine transformation matrix:

|a  c  e|
|b  d  f|
|0  0  1|

constructors fromStr

Parse from SVG string format

make

Construct from matrix values

fields a

b

c

d

e

f

defVal

Default instance is no transform

methods toStr

Return in matrix(<a> <b> <c> <d> <e> <f>) format

rotate

Rotate angle in degrees

mult

Multiply this matrix by given matrix and return result as new instance

equals

Equality is based on string format

skewX

Skew x by angle in degrees

scale

Scale transform

skewY

Skew y by angle in degrees

hash

Hash code is based on string format

translate

Translate transform

a const Float : a

b const Float : b

c const Float : c

d const Float : d

defVal const static Transform : defVal

Default instance is no transform.

e const Float : e

equals virtual Bool equals(Obj? obj)

Equality is based on string format

f const Float : f

fromStr static new fromStr(Str s, Bool checked)

Parse from SVG string format:

matrix(<a> <b> <c> <d> <e> <f>)
translate(<x> [<y>])
scale(<x> [<y>])
rotate(<a> [<x> <y>])
skewX(<a>)
skewY(<a>)

hash virtual Int hash()

Hash code is based on string format

make new make(Float a, Float b, Float c, Float d, Float e, Float f)

Construct from matrix values

mult @Operator
This mult(Transform that)

Multiply this matrix by given matrix and return result as new instance

rotate static Transform rotate(Float angle, Float? cx, Float? cy)

Rotate angle in degrees

scale static Transform scale(Float sx, Float sy)

Scale transform

skewX static Transform skewX(Float angle)

Skew x by angle in degrees

skewY static Transform skewY(Float angle)

Skew y by angle in degrees

toStr virtual Str toStr()

Return in matrix(<a> <b> <c> <d> <e> <f>) format

translate static Transform translate(Float tx, Float ty)

Translate transform

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST