| 1 |
|
| 2 |
@c %start of fragment |
| 3 |
|
| 4 |
@node cairo_matrix_t |
| 5 |
@chapter cairo_matrix_t |
| 6 |
Generic matrix operations |
| 7 |
|
| 8 |
@section Overview |
| 9 |
@code{<cairo-matrix-t>} is used throughout cairo to convert between |
| 10 |
different coordinate spaces. A @code{<cairo-matrix-t>} holds an affine |
| 11 |
transformation, such as a scale, rotation, shear, or a combination of |
| 12 |
these. The transformation of a point (@samp{x},@samp{y}) is given by: |
| 13 |
|
| 14 |
@example |
| 15 |
|
| 16 |
x_new = xx * x + xy * y + x0; |
| 17 |
y_new = yx * x + yy * y + y0; |
| 18 |
@end example |
| 19 |
|
| 20 |
The current transformation matrix of a @code{<cairo-t>}, represented as |
| 21 |
a @code{<cairo-matrix-t>}, defines the transformation from user-space |
| 22 |
coordinates to device-space coordinates. See @code{cairo-get-matrix} and |
| 23 |
@code{cairo-set-matrix}. |
| 24 |
|
| 25 |
@section Usage |
| 26 |
@include defuns-cairo-matrix.xml.texi |
| 27 |
|
| 28 |
@c %end of fragment |