Package: cairo

CStruct cairo:matrix-t

Declaration

(cffi:defcstruct matrix-t
  (xx :double)
  (yx :double)
  (xy :double)
  (yy :double)
  (x0 :double)
  (y0 :double))  

Values

xx
The double float for the xx component.
yx
The double float for the yx component.
xy
The double float for the xy component.
yy
The double float for the yy component.
x0
The double float for the x translation component.
y0
The double float for the y translation component.

Details

The cairo:matrix-t structure holds an affine transformation, such as a scale, rotation, shear, or a combination of those. The transformation of a point (x,y) is given by:
xnew = xx * x + xy * y + x0
ynew = yx * x + yy * y + y0  
The current transformation matrix (CTM) of a cairo:context-t instance, represented as a cairo:matrix-t structure, defines the transformation from user space coordinates to device space coordinates. See also the cairo:matrix function.
 

See also

2025-09-02