Transform
@Js
@Serializable { simple=true }
const class Transform : Obj
Transform models an affine transformation matrix:
|a c e| |b d f| |0 0 1|
Parse from SVG string format
Construct from matrix values
Default instance is no transform
Return in matrix(<a> <b> <c> <d> <e> <f>) format
Rotate angle in degrees
Multiply this matrix by given matrix and return result as new instance
Equality is based on string format
Skew x by angle in degrees
Scale transform
Skew y by angle in degrees
Hash code is based on string format
Translate transform
const Float : a
const Float : b
const Float : c
const Float : d
const static Transform : defVal
Default instance is no transform.
const Float : e
virtual Bool equals(Obj? obj)
Equality is based on string format
const Float : f
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>)
virtual Int hash()
Hash code is based on string format
new make(Float a, Float b, Float c, Float d, Float e, Float f)
Construct from matrix values
@Operator
This mult(Transform that)
Multiply this matrix by given matrix and return result as new instance
static Transform rotate(Float angle, Float? cx, Float? cy)
Rotate angle in degrees
static Transform scale(Float sx, Float sy)
Scale transform
static Transform skewX(Float angle)
Skew x by angle in degrees
static Transform skewY(Float angle)
Skew y by angle in degrees
virtual Str toStr()
Return in matrix(<a> <b> <c> <d> <e> <f>) format
static Transform translate(Float tx, Float ty)
Translate transform