Package: graphene

Function graphene:matrix-init-from-2d

Lambda List

graphene:matrix-init-from-2d (matrix xx yx xy yy x0 y0)

Arguments

matrix -- a graphene:matrix-t instance
xx -- a number for the xx member
yx -- a number for the yx member
xy -- a number for the xy member
yy -- a number for the yy member
x0 -- a number for the x0 member
y0 -- a number for the y0 member

Return Value

The initialized graphene:matrix-t instance.

Details

Initializes the matrix from the values of an affine transformation matrix. The arguments map to the following matrix layout:
⎛ xx  yx ⎞   ⎛  a   b  0 ⎞
⎜ xy  yy ⎟ = ⎜  c   d  0 ⎟
⎝ x0  y0 ⎠   ⎝ tx  ty  1 ⎠  
This function can be used to convert between an affine matrix type from other libraries and a graphene:matrix-t instance.

Notes

All numbers are coerced to a double float before being passed to the foreign C function.
 

See also

#2024-12-30