1
\alias{cairo-cairo-matrix-t}
3
\name{cairo-cairo-matrix-t}
5
\description{Generic matrix operations}
6
\section{Methods and Functions}{
7
\code{\link{cairoMatrixInit}(xx, yx, xy, yy, x0, y0)}\cr
8
\code{\link{cairoMatrixInitIdentity}()}\cr
9
\code{\link{cairoMatrixInitTranslate}(tx, ty)}\cr
10
\code{\link{cairoMatrixInitScale}(sx, sy)}\cr
11
\code{\link{cairoMatrixInitRotate}(radians)}\cr
12
\code{\link{cairoMatrixTranslate}(matrix, tx, ty)}\cr
13
\code{\link{cairoMatrixScale}(matrix, sx, sy)}\cr
14
\code{\link{cairoMatrixRotate}(matrix, radians)}\cr
15
\code{\link{cairoMatrixInvert}(matrix)}\cr
16
\code{\link{cairoMatrixMultiply}(result, a, b)}\cr
17
\code{\link{cairoMatrixTransformDistance}(matrix, dx, dy)}\cr
18
\code{\link{cairoMatrixTransformPoint}(matrix, x, y)}\cr
20
\section{Detailed Description}{\verb{\link{CairoMatrix}} is used throughout cairo to convert between different
21
coordinate spaces. A \verb{\link{CairoMatrix}} holds an affine transformation,
22
such as a scale, rotation, shear, or a combination of these.
23
The transformation of a point (\code{x},\code{y})
25
\preformatted{ x_new = xx * x + xy * y + x0;
26
y_new = yx * x + yy * y + y0;
29
The current transformation matrix of a \verb{\link{Cairo}}, represented as a
30
\verb{\link{CairoMatrix}}, defines the transformation from user-space
31
coordinates to device-space coordinates. See \code{\link{cairoGetMatrix}} and
32
\code{\link{cairoSetMatrix}}.
34
\section{Structures}{\describe{\item{\verb{CairoMatrix}}{
35
A \verb{\link{CairoMatrix}} holds an affine transformation, such as a scale,
36
rotation, shear, or a combination of those. The transformation of
37
a point (x, y) is given by:
38
\preformatted{ x_new = xx * x + xy * y + x0;
39
y_new = yx * x + yy * y + y0;
43
\item{\verb{xx}}{[numeric] xx component of the affine transformation}
44
\item{\verb{yx}}{[numeric] yx component of the affine transformation}
45
\item{\verb{xy}}{[numeric] xy component of the affine transformation}
46
\item{\verb{yy}}{[numeric] yy component of the affine transformation}
47
\item{\verb{x0}}{[numeric] X translation component of the affine transformation}
48
\item{\verb{y0}}{[numeric] Y translation component of the affine transformation}
52
\references{\url{http://www.cairographics.org/manual/cairo-cairo-matrix-t.html}}
53
\author{Derived by RGtkGen from GTK+ documentation}