const class graphics::Transform

sys::Obj
  graphics::Transform

@Js
@Serializable { simple=true }

Source

Transform models an affine transformation matrix:

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

const Float a

Source

b

const Float b

Source

c

const Float c

Source

d

const Float d

Source

defVal

const static Transform defVal := ...

Source

Default instance is no transform.

e

const Float e

Source

equals

virtual override Bool equals(Obj? obj)

Source

Equality is based on string format

f

const Float f

Source

fromStr

static new fromStr(Str s, Bool checked := true)

Source

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 override Int hash()

Source

Hash code is based on string format

make

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

Source

Construct from matrix values

mult

@Operator
This mult(Transform that)

Source

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

rotate

static Transform rotate(Float angle, Float? cx := null, Float? cy := null)

Source

Rotate angle in degrees

scale

static Transform scale(Float sx, Float sy)

Source

Scale transform

skewX

static Transform skewX(Float angle)

Source

Skew x by angle in degrees

skewY

static Transform skewY(Float angle)

Source

Skew y by angle in degrees

toStr

virtual override Str toStr()

Source

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

translate

static Transform translate(Float tx, Float ty)

Source

Translate transform