Package: cairo

Function cairo:matrix-init-scale

Lambda List

cairo:matrix-init-scale (matrix sx sy)

Arguments

matrix -- a cairo:matrix-t instance to initialize
sx -- a number coerced to a double float for the scale factor in the x direction
sy -- a number coerced to a double float for the scale factor in the y direction

Return Value

The initialized cairo:matrix-t instance.

Details

Initializes the matrix to a transformation that scales by sx and sy in the x and y dimensions, respectively.

Examples

The cairo:with-matrix macro uses this function for initialising the matrix for a transformation that scales.
(cairo:with-matrix (matrix :scale  1/2 2)
  (cairo:matrix-to-float matrix))
=> (0.5d0 0.0d0 0.0d0 2.0d0 0.0d0 0.0d0)    
 

See also

2025-1-18