src/swipl-devel/packages/xpce/man/refmanual/md/transform.md

class transform {#class-transform}

2-D affine transformation. A transform represents the matrix

[ x' ]   [ xx  xy ] [ x ]   [ tx ]
[    ] = [        ] [   ] + [    ]
[ y' ]   [ yx  yy ] [ y ]   [ ty ]

that maps points and areas from a source coordinate space into a target space. Composition follows the cairo convention: methods such as ->scale and ->rotate post-multiply the operation into self (self := self * Op), so the operation is applied to the input first and the receiver afterwards. A sequence

send(T, scale, 2), send(T, rotate, 30)

therefore rotates a point first and then scales the rotated result.

@see class point @see class area @see class device

Instance variables {#class-transform-instvars}

Send methods {#class-transform-send}

Get methods {#class-transform-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.