| 1 |
|
| 2 |
@c %start of fragment |
| 3 |
|
| 4 |
@deffn Function cairo-translate (@var{cr}@tie{}@code{<cairo-t>}) (@var{tx}@tie{}@code{<double>}) (@var{ty}@tie{}@code{<double>}) |
| 5 |
Modifies the current transformation matrix (CTM) by translating the |
| 6 |
user-space origin by (@var{tx}, @var{ty}). This offset is interpreted as |
| 7 |
a user-space coordinate according to the CTM in place before the new |
| 8 |
call to @code{cairo-translate}. In other words, the translation of the |
| 9 |
user-space origin takes place after any existing transformation. |
| 10 |
|
| 11 |
@table @var |
| 12 |
@item cr |
| 13 |
a cairo context |
| 14 |
|
| 15 |
@item tx |
| 16 |
amount to translate in the X direction |
| 17 |
|
| 18 |
@item ty |
| 19 |
amount to translate in the Y direction |
| 20 |
|
| 21 |
@end table |
| 22 |
|
| 23 |
@end deffn |
| 24 |
|
| 25 |
@deffn Function cairo-scale (@var{cr}@tie{}@code{<cairo-t>}) (@var{sx}@tie{}@code{<double>}) (@var{sy}@tie{}@code{<double>}) |
| 26 |
Modifies the current transformation matrix (CTM) by scaling the X and Y |
| 27 |
user-space axes by @var{sx} and @var{sy} respectively. The scaling of |
| 28 |
the axes takes place after any existing transformation of user space. |
| 29 |
|
| 30 |
@table @var |
| 31 |
@item cr |
| 32 |
a cairo context |
| 33 |
|
| 34 |
@item sx |
| 35 |
scale factor for the X dimension |
| 36 |
|
| 37 |
@item sy |
| 38 |
scale factor for the Y dimension |
| 39 |
|
| 40 |
@end table |
| 41 |
|
| 42 |
@end deffn |
| 43 |
|
| 44 |
@deffn Function cairo-rotate (@var{cr}@tie{}@code{<cairo-t>}) (@var{angle}@tie{}@code{<double>}) |
| 45 |
Modifies the current transformation matrix (CTM) by rotating the |
| 46 |
user-space axes by @var{angle} radians. The rotation of the axes takes |
| 47 |
places after any existing transformation of user space. The rotation |
| 48 |
direction for positive angles is from the positive X axis toward the |
| 49 |
positive Y axis. |
| 50 |
|
| 51 |
@table @var |
| 52 |
@item cr |
| 53 |
a cairo context |
| 54 |
|
| 55 |
@item angle |
| 56 |
angle (in radians) by which the user-space axes will be rotated |
| 57 |
|
| 58 |
@end table |
| 59 |
|
| 60 |
@end deffn |
| 61 |
|
| 62 |
@deffn Function cairo-transform (@var{cr}@tie{}@code{<cairo-t>}) (@var{matrix}@tie{}@code{<cairo-matrix-t>}) |
| 63 |
Modifies the current transformation matrix (CTM) by applying |
| 64 |
@var{matrix} as an additional transformation. The new transformation of |
| 65 |
user space takes place after any existing transformation. |
| 66 |
|
| 67 |
@table @var |
| 68 |
@item cr |
| 69 |
a cairo context |
| 70 |
|
| 71 |
@item matrix |
| 72 |
a transformation to be applied to the user-space axes |
| 73 |
|
| 74 |
@end table |
| 75 |
|
| 76 |
@end deffn |
| 77 |
|
| 78 |
@deffn Function cairo-set-matrix (@var{cr}@tie{}@code{<cairo-t>}) (@var{matrix}@tie{}@code{<cairo-matrix-t>}) |
| 79 |
Modifies the current transformation matrix (CTM) by setting it equal to |
| 80 |
@var{matrix}. |
| 81 |
|
| 82 |
@table @var |
| 83 |
@item cr |
| 84 |
a cairo context |
| 85 |
|
| 86 |
@item matrix |
| 87 |
a transformation matrix from user space to device space |
| 88 |
|
| 89 |
@end table |
| 90 |
|
| 91 |
@end deffn |
| 92 |
|
| 93 |
@deffn Function cairo-get-matrix (@var{cr}@tie{}@code{<cairo-t>}) (@var{matrix}@tie{}@code{<cairo-matrix-t>}) |
| 94 |
Stores the current transformation matrix (CTM) into @var{matrix}. |
| 95 |
|
| 96 |
@table @var |
| 97 |
@item cr |
| 98 |
a cairo context |
| 99 |
|
| 100 |
@item matrix |
| 101 |
return value for the matrix |
| 102 |
|
| 103 |
@end table |
| 104 |
|
| 105 |
@end deffn |
| 106 |
|
| 107 |
@deffn Function cairo-identity-matrix (@var{cr}@tie{}@code{<cairo-t>}) |
| 108 |
Resets the current transformation matrix (CTM) by setting it equal to |
| 109 |
the identity matrix. That is, the user-space and device-space axes will |
| 110 |
be aligned and one user-space unit will transform to one device-space |
| 111 |
unit. |
| 112 |
|
| 113 |
@table @var |
| 114 |
@item cr |
| 115 |
a cairo context |
| 116 |
|
| 117 |
@end table |
| 118 |
|
| 119 |
@end deffn |
| 120 |
|
| 121 |
@deffn Function cairo-user-to-device (@var{cr}@tie{}@code{<cairo-t>}) @result{}@tie{} (@var{x}@tie{}@code{<double>}) (@var{y}@tie{}@code{<double>}) |
| 122 |
Transform a coordinate from user space to device space by multiplying |
| 123 |
the given point by the current transformation matrix (CTM). |
| 124 |
|
| 125 |
@table @var |
| 126 |
@item cr |
| 127 |
a cairo context |
| 128 |
|
| 129 |
@item x |
| 130 |
X value of coordinate (in/out parameter) |
| 131 |
|
| 132 |
@item y |
| 133 |
Y value of coordinate (in/out parameter) |
| 134 |
|
| 135 |
@end table |
| 136 |
|
| 137 |
@end deffn |
| 138 |
|
| 139 |
@deffn Function cairo-user-to-device-distance (@var{cr}@tie{}@code{<cairo-t>}) @result{}@tie{} (@var{dx}@tie{}@code{<double>}) (@var{dy}@tie{}@code{<double>}) |
| 140 |
Transform a distance vector from user space to device space. This |
| 141 |
function is similar to @code{cairo-user-to-device} except that the |
| 142 |
translation components of the CTM will be ignored when transforming |
| 143 |
(@var{dx},@var{dy}). |
| 144 |
|
| 145 |
@table @var |
| 146 |
@item cr |
| 147 |
a cairo context |
| 148 |
|
| 149 |
@item dx |
| 150 |
X component of a distance vector (in/out parameter) |
| 151 |
|
| 152 |
@item dy |
| 153 |
Y component of a distance vector (in/out parameter) |
| 154 |
|
| 155 |
@end table |
| 156 |
|
| 157 |
@end deffn |
| 158 |
|
| 159 |
@deffn Function cairo-device-to-user (@var{cr}@tie{}@code{<cairo-t>}) @result{}@tie{} (@var{x}@tie{}@code{<double>}) (@var{y}@tie{}@code{<double>}) |
| 160 |
Transform a coordinate from device space to user space by multiplying |
| 161 |
the given point by the inverse of the current transformation matrix |
| 162 |
(CTM). |
| 163 |
|
| 164 |
@table @var |
| 165 |
@item cr |
| 166 |
a cairo |
| 167 |
|
| 168 |
@item x |
| 169 |
X value of coordinate (in/out parameter) |
| 170 |
|
| 171 |
@item y |
| 172 |
Y value of coordinate (in/out parameter) |
| 173 |
|
| 174 |
@end table |
| 175 |
|
| 176 |
@end deffn |
| 177 |
|
| 178 |
@deffn Function cairo-device-to-user-distance (@var{cr}@tie{}@code{<cairo-t>}) @result{}@tie{} (@var{dx}@tie{}@code{<double>}) (@var{dy}@tie{}@code{<double>}) |
| 179 |
Transform a distance vector from device space to user space. This |
| 180 |
function is similar to @code{cairo-device-to-user} except that the |
| 181 |
translation components of the inverse CTM will be ignored when |
| 182 |
transforming (@var{dx},@var{dy}). |
| 183 |
|
| 184 |
@table @var |
| 185 |
@item cr |
| 186 |
a cairo context |
| 187 |
|
| 188 |
@item dx |
| 189 |
X component of a distance vector (in/out parameter) |
| 190 |
|
| 191 |
@item dy |
| 192 |
Y component of a distance vector (in/out parameter) |
| 193 |
|
| 194 |
@end table |
| 195 |
|
| 196 |
@end deffn |
| 197 |
|
| 198 |
|
| 199 |
@c %end of fragment |