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 with the xx component.
yx
The double float with the yx component.
xy
The double float with the xy component.
yy
The double float with the yy component.
x0
The double float with the x translation component.
y0
The double float with 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-1-18