| 1 |
WARNING: (gnome gw support gtk-doc): `filter' imported from both (srfi srfi-1) and (sxml xpath) |
| 2 |
cairo-font-options-create |
| 3 |
- Function: cairo-font-options-create ==>(RET `<cairo-font-options-t>') |
| 4 |
Allocates a new font options object with all options initialized to default |
| 5 |
values. |
| 6 |
|
| 7 |
ret |
| 8 |
a newly allocated `<cairo-font-options-t>'. Free with |
| 9 |
`cairo-font-options-destroy'. This function always returns a valid |
| 10 |
pointer; if memory cannot be allocated, then a special error object is |
| 11 |
returned where all operations on the object do nothing. You can check |
| 12 |
for this with `cairo-font-options-status'. |
| 13 |
|
| 14 |
This documentation was automatically generated. |
| 15 |
|
| 16 |
cairo-font-options-copy |
| 17 |
- Function: cairo-font-options-copy (ORIGINAL `<cairo-font-options-t>') ==>(RET |
| 18 |
`<cairo-font-options-t>') |
| 19 |
Allocates a new font options object copying the option values from |
| 20 |
ORIGINAL. |
| 21 |
|
| 22 |
original |
| 23 |
a `<cairo-font-options-t>' |
| 24 |
|
| 25 |
ret |
| 26 |
a newly allocated `<cairo-font-options-t>'. Free with |
| 27 |
`cairo-font-options-destroy'. This function always returns a valid |
| 28 |
pointer; if memory cannot be allocated, then a special error object is |
| 29 |
returned where all operations on the object do nothing. You can check |
| 30 |
for this with `cairo-font-options-status'. |
| 31 |
|
| 32 |
This documentation was automatically generated. |
| 33 |
|
| 34 |
cairo-font-options-merge |
| 35 |
- Function: cairo-font-options-merge (OPTIONS `<cairo-font-options-t>')(OTHER |
| 36 |
`<cairo-font-options-t>') |
| 37 |
Merges non-default options from OTHER into OPTIONS, replacing existing |
| 38 |
values. This operation can be thought of as somewhat similar to compositing |
| 39 |
OTHER onto OPTIONS with the operation of `CAIRO_OPERATION_OVER'. |
| 40 |
|
| 41 |
options |
| 42 |
a `<cairo-font-options-t>' |
| 43 |
|
| 44 |
other |
| 45 |
another `<cairo-font-options-t>' |
| 46 |
|
| 47 |
This documentation was automatically generated. |
| 48 |
|
| 49 |
cairo-font-options-hash |
| 50 |
- Function: cairo-font-options-hash (OPTIONS `<cairo-font-options-t>') ==>(RET |
| 51 |
`<unsigned long>') |
| 52 |
Compute a hash for the font options object; this value will be useful when |
| 53 |
storing an object containing a cairo_font_options_t in a hash table. |
| 54 |
|
| 55 |
options |
| 56 |
a `<cairo-font-options-t>' |
| 57 |
|
| 58 |
ret |
| 59 |
the hash value for the font options object. The return value can be |
| 60 |
cast to a 32-bit type if a 32-bit hash value is needed. |
| 61 |
|
| 62 |
This documentation was automatically generated. |
| 63 |
|
| 64 |
cairo-font-options-set-antialias |
| 65 |
- Function: cairo-font-options-set-antialias (OPTIONS |
| 66 |
`<cairo-font-options-t>')(ANTIALIAS `<cairo-antialias-t>') |
| 67 |
Sets the antialiasing mode for the font options object. This specifies the |
| 68 |
type of antialiasing to do when rendering text. |
| 69 |
|
| 70 |
options |
| 71 |
a `<cairo-font-options-t>' |
| 72 |
|
| 73 |
antialias |
| 74 |
the new antialiasing mode |
| 75 |
|
| 76 |
This documentation was automatically generated. |
| 77 |
|
| 78 |
cairo-font-options-get-antialias |
| 79 |
- Function: cairo-font-options-get-antialias (OPTIONS `<cairo-font-options-t>') |
| 80 |
==>(RET `<cairo-antialias-t>') |
| 81 |
Gets the antialiasing mode for the font options object. |
| 82 |
|
| 83 |
options |
| 84 |
a `<cairo-font-options-t>' |
| 85 |
|
| 86 |
ret |
| 87 |
the antialiasing mode |
| 88 |
|
| 89 |
This documentation was automatically generated. |
| 90 |
|
| 91 |
cairo-font-options-set-hint-style |
| 92 |
- Function: cairo-font-options-set-hint-style (OPTIONS |
| 93 |
`<cairo-font-options-t>')(HINT-STYLE `<cairo-hint-style-t>') |
| 94 |
Sets the hint style for font outlines for the font options object. This |
| 95 |
controls whether to fit font outlines to the pixel grid, and if so, whether |
| 96 |
to optimize for fidelity or contrast. See the documentation for |
| 97 |
`<cairo-hint-style-t>' for full details. |
| 98 |
|
| 99 |
options |
| 100 |
a `<cairo-font-options-t>' |
| 101 |
|
| 102 |
hint-style |
| 103 |
the new hint style |
| 104 |
|
| 105 |
This documentation was automatically generated. |
| 106 |
|
| 107 |
cairo-font-options-get-hint-style |
| 108 |
- Function: cairo-font-options-get-hint-style (OPTIONS `<cairo-font-options-t>') |
| 109 |
==>(RET `<cairo-hint-style-t>') |
| 110 |
Gets the hint style for font outlines for the font options object. See the |
| 111 |
documentation for `<cairo-hint-style-t>' for full details. |
| 112 |
|
| 113 |
options |
| 114 |
a `<cairo-font-options-t>' |
| 115 |
|
| 116 |
ret |
| 117 |
the hint style for the font options object |
| 118 |
|
| 119 |
This documentation was automatically generated. |
| 120 |
|
| 121 |
cairo-font-options-set-hint-metrics |
| 122 |
- Function: cairo-font-options-set-hint-metrics (OPTIONS |
| 123 |
`<cairo-font-options-t>')(HINT-METRICS `<cairo-hint-metrics-t>') |
| 124 |
Sets the metrics hinting mode for the font options object. This controls |
| 125 |
whether metrics are quantized to integer values in device units. See the |
| 126 |
documentation for `<cairo-hint-metrics-t>' for full details. |
| 127 |
|
| 128 |
options |
| 129 |
a `<cairo-font-options-t>' |
| 130 |
|
| 131 |
hint-metrics |
| 132 |
the new metrics hinting mode |
| 133 |
|
| 134 |
This documentation was automatically generated. |
| 135 |
|
| 136 |
cairo-font-face-get-type |
| 137 |
- Function: cairo-font-face-get-type (FONT-FACE `<cairo-font-face-t>') ==>(RET |
| 138 |
`<cairo-font-type-t>') |
| 139 |
This function returns the type of the backend used to create a font face. |
| 140 |
See `<cairo-font-type-t>' for available types. |
| 141 |
|
| 142 |
font-face |
| 143 |
a font face |
| 144 |
|
| 145 |
ret |
| 146 |
The type of FONT-FACE. |
| 147 |
|
| 148 |
Since 1.2 |
| 149 |
|
| 150 |
This documentation was automatically generated. |
| 151 |
|
| 152 |
cairo-image-surface-create |
| 153 |
- Function: cairo-image-surface-create (FORMAT `<cairo-format-t>')(WIDTH |
| 154 |
`<int>')(HEIGHT `<int>') ==>(RET `<cairo-surface-t>') |
| 155 |
Creates an image surface of the specified format and dimensions. Initially |
| 156 |
the surface contents are all 0. (Specifically, within each pixel, each |
| 157 |
color or alpha channel belonging to format will be 0. The contents of bits |
| 158 |
within a pixel, but not belonging to the given format are undefined). |
| 159 |
|
| 160 |
format |
| 161 |
format of pixels in the surface to create |
| 162 |
|
| 163 |
width |
| 164 |
width of the surface, in pixels |
| 165 |
|
| 166 |
height |
| 167 |
height of the surface, in pixels |
| 168 |
|
| 169 |
ret |
| 170 |
a pointer to the newly created surface. The caller owns the surface |
| 171 |
and should call cairo_surface_destroy when done with it. This function |
| 172 |
always returns a valid pointer, but it will return a pointer to a |
| 173 |
"nil" surface if an error such as out of memory occurs. You can use |
| 174 |
`cairo-surface-status' to check for this. |
| 175 |
|
| 176 |
This documentation was automatically generated. |
| 177 |
|
| 178 |
cairo-image-surface-get-format |
| 179 |
- Function: cairo-image-surface-get-format (SURFACE `<cairo-surface-t>') ==>(RET |
| 180 |
`<cairo-format-t>') |
| 181 |
Get the format of the surface. |
| 182 |
|
| 183 |
surface |
| 184 |
a `<cairo-image-surface-t>' |
| 185 |
|
| 186 |
ret |
| 187 |
the format of the surface |
| 188 |
|
| 189 |
Since 1.2 |
| 190 |
|
| 191 |
This documentation was automatically generated. |
| 192 |
|
| 193 |
cairo-image-surface-get-width |
| 194 |
- Function: cairo-image-surface-get-width (SURFACE `<cairo-surface-t>') ==>(RET |
| 195 |
`<int>') |
| 196 |
Get the width of the image surface in pixels. |
| 197 |
|
| 198 |
surface |
| 199 |
a `<cairo-image-surface-t>' |
| 200 |
|
| 201 |
ret |
| 202 |
the width of the surface in pixels. |
| 203 |
|
| 204 |
This documentation was automatically generated. |
| 205 |
|
| 206 |
cairo-matrix-translate |
| 207 |
- Function: cairo-matrix-translate (MATRIX `<cairo-matrix-t>')(TX `<double>')(TY |
| 208 |
`<double>') |
| 209 |
Applies a translation by TX, TY to the transformation in MATRIX. The effect |
| 210 |
of the new transformation is to first translate the coordinates by TX and |
| 211 |
TY, then apply the original transformation to the coordinates. |
| 212 |
|
| 213 |
matrix |
| 214 |
a cairo_matrix_t |
| 215 |
|
| 216 |
tx |
| 217 |
amount to translate in the X direction |
| 218 |
|
| 219 |
ty |
| 220 |
amount to translate in the Y direction |
| 221 |
|
| 222 |
This documentation was automatically generated. |
| 223 |
|
| 224 |
cairo-matrix-invert |
| 225 |
- Function: cairo-matrix-invert (MATRIX `<cairo-matrix-t>') ==>(RET |
| 226 |
`<cairo-status-t>') |
| 227 |
Changes MATRIX to be the inverse of it's original value. Not all |
| 228 |
transformation matrices have inverses; if the matrix collapses points |
| 229 |
together (it is "degenerate"), then it has no inverse and this function |
| 230 |
will fail. |
| 231 |
|
| 232 |
Returns: If MATRIX has an inverse, modifies MATRIX to be the inverse matrix |
| 233 |
and returns `CAIRO_STATUS_SUCCESS'. Otherwise, |
| 234 |
|
| 235 |
matrix |
| 236 |
a `<cairo-matrix-t>' |
| 237 |
|
| 238 |
ret |
| 239 |
`CAIRO_STATUS_INVALID_MATRIX'. |
| 240 |
|
| 241 |
This documentation was automatically generated. |
| 242 |
|
| 243 |
cairo-matrix-multiply |
| 244 |
- Function: cairo-matrix-multiply (RESULT `<cairo-matrix-t>')(A |
| 245 |
`<cairo-matrix-t>')(B `<cairo-matrix-t>') |
| 246 |
Multiplies the affine transformations in A and B together and stores the |
| 247 |
result in RESULT. The effect of the resulting transformation is to first |
| 248 |
apply the transformation in A to the coordinates and then apply the |
| 249 |
transformation in B to the coordinates. |
| 250 |
|
| 251 |
It is allowable for RESULT to be identical to either A or B. |
| 252 |
|
| 253 |
result |
| 254 |
a `<cairo-matrix-t>' in which to store the result |
| 255 |
|
| 256 |
a |
| 257 |
a `<cairo-matrix-t>' |
| 258 |
|
| 259 |
b |
| 260 |
a `<cairo-matrix-t>' |
| 261 |
|
| 262 |
This documentation was automatically generated. |
| 263 |
|
| 264 |
cairo-matrix-transform-distance |
| 265 |
- Function: cairo-matrix-transform-distance (MATRIX `<cairo-matrix-t>') ==>(DX |
| 266 |
`<double>')(DY `<double>') |
| 267 |
Transforms the distance vector (DX,DY) by MATRIX. This is similar to |
| 268 |
`cairo-matrix-transform-point' except that the translation components of |
| 269 |
the transformation are ignored. The calculation of the returned vector is |
| 270 |
as follows: |
| 271 |
|
| 272 |
|
| 273 |
dx2 = dx1 * a + dy1 * c; |
| 274 |
dy2 = dx1 * b + dy1 * d; |
| 275 |
|
| 276 |
|
| 277 |
Affine transformations are position invariant, so the same vector always |
| 278 |
transforms to the same vector. If (X1,Y1) transforms to (X2,Y2) then |
| 279 |
(X1+DX1,Y1+DY1) will transform to (X1+DX2,Y1+DY2) for all values of X1 and |
| 280 |
X2. |
| 281 |
|
| 282 |
matrix |
| 283 |
a `<cairo-matrix-t>' |
| 284 |
|
| 285 |
dx |
| 286 |
X component of a distance vector. An in/out parameter |
| 287 |
|
| 288 |
dy |
| 289 |
Y component of a distance vector. An in/out parameter |
| 290 |
|
| 291 |
This documentation was automatically generated. |
| 292 |
|
| 293 |
cairo-matrix-transform-point |
| 294 |
- Function: cairo-matrix-transform-point (MATRIX `<cairo-matrix-t>') ==>(X |
| 295 |
`<double>')(Y `<double>') |
| 296 |
Transforms the point (X, Y) by MATRIX. |
| 297 |
|
| 298 |
matrix |
| 299 |
a `<cairo-matrix-t>' |
| 300 |
|
| 301 |
x |
| 302 |
X position. An in/out parameter |
| 303 |
|
| 304 |
y |
| 305 |
Y position. An in/out parameter |
| 306 |
|
| 307 |
This documentation was automatically generated. |
| 308 |
|
| 309 |
cairo-copy-path |
| 310 |
- Function: cairo-copy-path (CR `<cairo-t>') ==>(RET `<cairo-path-t>') |
| 311 |
Creates a copy of the current path and returns it to the user as a |
| 312 |
`<cairo-path-t>'. See `<cairo-path-data-t>' for hints on how to iterate |
| 313 |
over the returned data structure. |
| 314 |
|
| 315 |
This function will always return a valid pointer, but the result will have |
| 316 |
no data (`data==NULL' and `num_data==0'), if either of the following |
| 317 |
conditions hold: |
| 318 |
|
| 319 |
If ther1. s insufficient memory to copy the path. In this |
| 320 |
case `path->status' will be set to |
| 321 |
`CAIRO_STATUS_NO_MEMORY'.If CR i2. lready in an error state. In this case |
| 322 |
`path->status' will contain the same status that |
| 323 |
would be returned by `cairo-status'. In either case, `path->status' will be set to `CAIRO_STATUS_NO_MEMORY' |
| 324 |
(regardless of what the error status in CR might have been). |
| 325 |
|
| 326 |
cr |
| 327 |
a cairo context |
| 328 |
|
| 329 |
ret |
| 330 |
the copy of the current path. The caller owns the returned object and |
| 331 |
should call `cairo-path-destroy' when finished with it. |
| 332 |
|
| 333 |
This documentation was automatically generated. |
| 334 |
|
| 335 |
cairo-copy-path-flat |
| 336 |
- Function: cairo-copy-path-flat (CR `<cairo-t>') ==>(RET `<cairo-path-t>') |
| 337 |
Gets a flattened copy of the current path and returns it to the user as a |
| 338 |
`<cairo-path-t>'. See `<cairo-path-data-t>' for hints on how to iterate |
| 339 |
over the returned data structure. |
| 340 |
|
| 341 |
This function is like `cairo-copy-path' except that any curves in the path |
| 342 |
will be approximated with piecewise-linear approximations, (accurate to |
| 343 |
within the current tolerance value). That is, the result is guaranteed to |
| 344 |
not have any elements of type `CAIRO_PATH_CURVE_TO' which will instead be |
| 345 |
replaced by a series of `CAIRO_PATH_LINE_TO' elements. |
| 346 |
|
| 347 |
This function will always return a valid pointer, but the result will have |
| 348 |
no data (`data==NULL' and `num_data==0'), if either of the following |
| 349 |
conditions hold: |
| 350 |
|
| 351 |
If ther1. s insufficient memory to copy the path. In this |
| 352 |
case `path->status' will be set to |
| 353 |
`CAIRO_STATUS_NO_MEMORY'.If CR i2. lready in an error state. In this case |
| 354 |
`path->status' will contain the same status that |
| 355 |
would be returned by `cairo-status'. cr |
| 356 |
a cairo context |
| 357 |
|
| 358 |
ret |
| 359 |
the copy of the current path. The caller owns the returned object and |
| 360 |
should call `cairo-path-destroy' when finished with it. |
| 361 |
|
| 362 |
This documentation was automatically generated. |
| 363 |
|
| 364 |
cairo-append-path |
| 365 |
- Function: cairo-append-path (CR `<cairo-t>')(PATH `<cairo-path-t>') |
| 366 |
Append the PATH onto the current path. The PATH may be either the return |
| 367 |
value from one of `cairo-copy-path' or `cairo-copy-path-flat' or it may be |
| 368 |
constructed manually. See `<cairo-path-t>' for details on how the path data |
| 369 |
structure should be initialized, and note that `path->status' must be |
| 370 |
initialized to `CAIRO_STATUS_SUCCESS'. |
| 371 |
|
| 372 |
cr |
| 373 |
a cairo context |
| 374 |
|
| 375 |
path |
| 376 |
path to be appended |
| 377 |
|
| 378 |
This documentation was automatically generated. |
| 379 |
|
| 380 |
cairo-get-current-point |
| 381 |
- Function: cairo-get-current-point (CR `<cairo-t>') ==>(X `<double>')(Y |
| 382 |
`<double>') |
| 383 |
Gets the current point of the current path, which is conceptually the final |
| 384 |
point reached by the path so far. |
| 385 |
|
| 386 |
The current point is returned in the user-space coordinate system. If there |
| 387 |
is no defined current point then X and Y will both be set to 0.0. |
| 388 |
|
| 389 |
Most path construction functions alter the current point. See the following |
| 390 |
for details on how they affect the current point: |
| 391 |
|
| 392 |
`cairo-new-path', `cairo-move-to', `cairo-line-to', `cairo-curve-to', |
| 393 |
`cairo-arc', `cairo-rel-move-to', `cairo-rel-line-to', |
| 394 |
`cairo-rel-curve-to', `cairo-arc', `cairo-text-path', |
| 395 |
`cairo-stroke-to-path' |
| 396 |
|
| 397 |
cr |
| 398 |
a cairo context |
| 399 |
|
| 400 |
x |
| 401 |
return value for X coordinate of the current point |
| 402 |
|
| 403 |
y |
| 404 |
return value for Y coordinate of the current point |
| 405 |
|
| 406 |
This documentation was automatically generated. |
| 407 |
|
| 408 |
cairo-new-path |
| 409 |
- Function: cairo-new-path (CR `<cairo-t>') |
| 410 |
Clears the current path. After this call there will be no path and no |
| 411 |
current point. |
| 412 |
|
| 413 |
cr |
| 414 |
a cairo context |
| 415 |
|
| 416 |
This documentation was automatically generated. |
| 417 |
|
| 418 |
cairo-new-sub-path |
| 419 |
- Function: cairo-new-sub-path (CR `<cairo-t>') |
| 420 |
Begin a new sub-path. Note that the existing path is not affected. After |
| 421 |
this call there will be no current point. |
| 422 |
|
| 423 |
In many cases, this call is not needed since new sub-paths are frequently |
| 424 |
started with `cairo-move-to'. |
| 425 |
|
| 426 |
A call to `cairo-new-sub-path' is particularly useful when beginning a new |
| 427 |
sub-path with one of the `cairo-arc' calls. This makes things easier as it |
| 428 |
is no longer necessary to manually compute the arc's initial coordinates |
| 429 |
for a call to `cairo-move-to'. |
| 430 |
|
| 431 |
cr |
| 432 |
a cairo context |
| 433 |
|
| 434 |
Since 1.2 |
| 435 |
|
| 436 |
This documentation was automatically generated. |
| 437 |
|
| 438 |
cairo-close-path |
| 439 |
- Function: cairo-close-path (CR `<cairo-t>') |
| 440 |
Adds a line segment to the path from the current point to the beginning of |
| 441 |
the current sub-path, (the most recent point passed to `cairo-move-to'), |
| 442 |
and closes this sub-path. After this call the current point will be at the |
| 443 |
joined endpoint of the sub-path. |
| 444 |
|
| 445 |
The behavior of `cairo-close-path' is distinct from simply calling |
| 446 |
`cairo-line-to' with the equivalent coordinate in the case of stroking. |
| 447 |
When a closed sub-path is stroked, there are no caps on the ends of the |
| 448 |
sub-path. Instead, there is a line join connecting the final and initial |
| 449 |
segments of the sub-path. |
| 450 |
|
| 451 |
If there is no current point before the call to cairo_close_path, this |
| 452 |
function will have no effect. |
| 453 |
|
| 454 |
Note: As of cairo version 1.2.4 any call to cairo_close_path will place an |
| 455 |
explicit MOVE_TO element into the path immediately after the CLOSE_PATH |
| 456 |
element, (which can be seen in `cairo-copy-path' for example). This can |
| 457 |
simplify path processing in some cases as it may not be necessary to save |
| 458 |
the "last move_to point" during processing as the MOVE_TO immediately after |
| 459 |
the CLOSE_PATH will provide that point. |
| 460 |
|
| 461 |
cr |
| 462 |
a cairo context |
| 463 |
|
| 464 |
This documentation was automatically generated. |
| 465 |
|
| 466 |
cairo-arc |
| 467 |
- Function: cairo-arc (CR `<cairo-t>')(XC `<double>')(YC `<double>')(RADIUS |
| 468 |
`<double>')(ANGLE1 `<double>')(ANGLE2 `<double>') |
| 469 |
Adds a circular arc of the given RADIUS to the current path. The arc is |
| 470 |
centered at (XC, YC), begins at ANGLE1 and proceeds in the direction of |
| 471 |
increasing angles to end at ANGLE2. If ANGLE2 is less than ANGLE1 it will |
| 472 |
be progressively increased by 2*M_PI until it is greater than ANGLE1. |
| 473 |
|
| 474 |
If there is a current point, an initial line segment will be added to the |
| 475 |
path to connect the current point to the beginning of the arc. |
| 476 |
|
| 477 |
Angles are measured in radians. An angle of 0.0 is in the direction of the |
| 478 |
positive X axis (in user space). An angle of `M_PI'/2.0 radians (90 |
| 479 |
degrees) is in the direction of the positive Y axis (in user space). Angles |
| 480 |
increase in the direction from the positive X axis toward the positive Y |
| 481 |
axis. So with the default transformation matrix, angles increase in a |
| 482 |
clockwise direction. |
| 483 |
|
| 484 |
(To convert from degrees to radians, use `degrees * (M_PI / 180.)'.) |
| 485 |
|
| 486 |
This function gives the arc in the direction of increasing angles; see |
| 487 |
`cairo-arc-negative' to get the arc in the direction of decreasing angles. |
| 488 |
|
| 489 |
The arc is circular in user space. To achieve an elliptical arc, you can |
| 490 |
scale the current transformation matrix by different amounts in the X and Y |
| 491 |
directions. For example, to draw an ellipse in the box given by X, Y, |
| 492 |
WIDTH, HEIGHT: |
| 493 |
|
| 494 |
|
| 495 |
cairo_save (cr); |
| 496 |
cairo_translate (cr, x + width / 2., y + height / 2.); |
| 497 |
cairo_scale (cr, width / 2., height / 2.); |
| 498 |
cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI); |
| 499 |
cairo_restore (cr); |
| 500 |
|
| 501 |
|
| 502 |
cr |
| 503 |
a cairo context |
| 504 |
|
| 505 |
xc |
| 506 |
X position of the center of the arc |
| 507 |
|
| 508 |
yc |
| 509 |
Y position of the center of the arc |
| 510 |
|
| 511 |
radius |
| 512 |
the radius of the arc |
| 513 |
|
| 514 |
angle1 |
| 515 |
the start angle, in radians |
| 516 |
|
| 517 |
angle2 |
| 518 |
the end angle, in radians |
| 519 |
|
| 520 |
This documentation was automatically generated. |
| 521 |
|
| 522 |
cairo-arc-negative |
| 523 |
- Function: cairo-arc-negative (CR `<cairo-t>')(XC `<double>')(YC |
| 524 |
`<double>')(RADIUS `<double>')(ANGLE1 `<double>')(ANGLE2 `<double>') |
| 525 |
Adds a circular arc of the given RADIUS to the current path. The arc is |
| 526 |
centered at (XC, YC), begins at ANGLE1 and proceeds in the direction of |
| 527 |
decreasing angles to end at ANGLE2. If ANGLE2 is greater than ANGLE1 it |
| 528 |
will be progressively decreased by 2*M_PI until it is less than ANGLE1. |
| 529 |
|
| 530 |
See `cairo-arc' for more details. This function differs only in the |
| 531 |
direction of the arc between the two angles. |
| 532 |
|
| 533 |
cr |
| 534 |
a cairo context |
| 535 |
|
| 536 |
xc |
| 537 |
X position of the center of the arc |
| 538 |
|
| 539 |
yc |
| 540 |
Y position of the center of the arc |
| 541 |
|
| 542 |
radius |
| 543 |
the radius of the arc |
| 544 |
|
| 545 |
angle1 |
| 546 |
the start angle, in radians |
| 547 |
|
| 548 |
angle2 |
| 549 |
the end angle, in radians |
| 550 |
|
| 551 |
This documentation was automatically generated. |
| 552 |
|
| 553 |
cairo-curve-to |
| 554 |
- Function: cairo-curve-to (CR `<cairo-t>')(X1 `<double>')(Y1 `<double>')(X2 |
| 555 |
`<double>')(Y2 `<double>')(X3 `<double>')(Y3 `<double>') |
| 556 |
Adds a cubic Bézier spline to the path from the current point to position |
| 557 |
(X3, Y3) in user-space coordinates, using (X1, Y1) and (X2, Y2) as the |
| 558 |
control points. After this call the current point will be (X3, Y3). |
| 559 |
|
| 560 |
If there is no current point before the call to `cairo-curve-to' this |
| 561 |
function will behave as if preceded by a call to cairo_move_to (CR, X1, |
| 562 |
Y1). |
| 563 |
|
| 564 |
cr |
| 565 |
a cairo context |
| 566 |
|
| 567 |
x1 |
| 568 |
the X coordinate of the first control point |
| 569 |
|
| 570 |
y1 |
| 571 |
the Y coordinate of the first control point |
| 572 |
|
| 573 |
x2 |
| 574 |
the X coordinate of the second control point |
| 575 |
|
| 576 |
y2 |
| 577 |
the Y coordinate of the second control point |
| 578 |
|
| 579 |
x3 |
| 580 |
the X coordinate of the end of the curve |
| 581 |
|
| 582 |
y3 |
| 583 |
the Y coordinate of the end of the curve |
| 584 |
|
| 585 |
This documentation was automatically generated. |
| 586 |
|
| 587 |
cairo-line-to |
| 588 |
- Function: cairo-line-to (CR `<cairo-t>')(X `<double>')(Y `<double>') |
| 589 |
Adds a line to the path from the current point to position (X, Y) in |
| 590 |
user-space coordinates. After this call the current point will be (X, Y). |
| 591 |
|
| 592 |
If there is no current point before the call to `cairo-line-to' this |
| 593 |
function will behave as cairo_move_to (CR, X, Y). |
| 594 |
|
| 595 |
cr |
| 596 |
a cairo context |
| 597 |
|
| 598 |
x |
| 599 |
the X coordinate of the end of the new line |
| 600 |
|
| 601 |
y |
| 602 |
the Y coordinate of the end of the new line |
| 603 |
|
| 604 |
This documentation was automatically generated. |
| 605 |
|
| 606 |
cairo-move-to |
| 607 |
- Function: cairo-move-to (CR `<cairo-t>')(X `<double>')(Y `<double>') |
| 608 |
Begin a new sub-path. After this call the current point will be (X, Y). |
| 609 |
|
| 610 |
cr |
| 611 |
a cairo context |
| 612 |
|
| 613 |
x |
| 614 |
the X coordinate of the new position |
| 615 |
|
| 616 |
y |
| 617 |
the Y coordinate of the new position |
| 618 |
|
| 619 |
This documentation was automatically generated. |
| 620 |
|
| 621 |
cairo-rectangle |
| 622 |
- Function: cairo-rectangle (CR `<cairo-t>')(X `<double>')(Y `<double>')(WIDTH |
| 623 |
`<double>')(HEIGHT `<double>') |
| 624 |
Adds a closed sub-path rectangle of the given size to the current path at |
| 625 |
position (X, Y) in user-space coordinates. |
| 626 |
|
| 627 |
This function is logically equivalent to: |
| 628 |
|
| 629 |
|
| 630 |
cairo_move_to (cr, x, y); |
| 631 |
cairo_rel_line_to (cr, width, 0); |
| 632 |
cairo_rel_line_to (cr, 0, height); |
| 633 |
cairo_rel_line_to (cr, -width, 0); |
| 634 |
cairo_close_path (cr); |
| 635 |
|
| 636 |
|
| 637 |
cr |
| 638 |
a cairo context |
| 639 |
|
| 640 |
x |
| 641 |
the X coordinate of the top left corner of the rectangle |
| 642 |
|
| 643 |
y |
| 644 |
the Y coordinate to the top left corner of the rectangle |
| 645 |
|
| 646 |
width |
| 647 |
the width of the rectangle |
| 648 |
|
| 649 |
height |
| 650 |
the height of the rectangle |
| 651 |
|
| 652 |
This documentation was automatically generated. |
| 653 |
|
| 654 |
cairo-glyph-path |
| 655 |
- Function: cairo-glyph-path (CR `<cairo-t>')(GLYPHS |
| 656 |
`<cairo-glyph-t>')(NUM-GLYPHS `<int>') |
| 657 |
Adds closed paths for the glyphs to the current path. The generated path if |
| 658 |
filled, achieves an effect similar to that of `cairo-show-glyphs'. |
| 659 |
|
| 660 |
cr |
| 661 |
a cairo context |
| 662 |
|
| 663 |
glyphs |
| 664 |
array of glyphs to show |
| 665 |
|
| 666 |
num-glyphs |
| 667 |
number of glyphs to show |
| 668 |
|
| 669 |
This documentation was automatically generated. |
| 670 |
|
| 671 |
cairo-text-path |
| 672 |
- Function: cairo-text-path (CR `<cairo-t>')(UTF8 `<char>') |
| 673 |
Adds closed paths for text to the current path. The generated path if |
| 674 |
filled, achieves an effect similar to that of `cairo-show-text'. |
| 675 |
|
| 676 |
Text conversion and positioning is done similar to `cairo-show-text'. |
| 677 |
|
| 678 |
Like `cairo-show-text', After this call the current point is moved to the |
| 679 |
origin of where the next glyph would be placed in this same progression. |
| 680 |
That is, the current point will be at the origin of the final glyph offset |
| 681 |
by its advance values. This allows for chaining multiple calls to to |
| 682 |
`cairo-text-path' without having to set current point in between. |
| 683 |
|
| 684 |
NOTE: The `cairo-text-path' function call is part of what the cairo |
| 685 |
designers call the "toy" text API. It is convenient for short demos and |
| 686 |
simple programs, but it is not expected to be adequate for serious |
| 687 |
text-using applications. See `cairo-glyph-path' for the "real" text path |
| 688 |
API in cairo. |
| 689 |
|
| 690 |
cr |
| 691 |
a cairo context |
| 692 |
|
| 693 |
utf8 |
| 694 |
a string of text encoded in UTF-8 |
| 695 |
|
| 696 |
This documentation was automatically generated. |
| 697 |
|
| 698 |
cairo-rel-curve-to |
| 699 |
- Function: cairo-rel-curve-to (CR `<cairo-t>')(DX1 `<double>')(DY1 |
| 700 |
`<double>')(DX2 `<double>')(DY2 `<double>')(DX3 `<double>')(DY3 `<double>') |
| 701 |
Relative-coordinate version of `cairo-curve-to'. All offsets are relative |
| 702 |
to the current point. Adds a cubic Bézier spline to the path from the |
| 703 |
current point to a point offset from the current point by (DX3, DY3), using |
| 704 |
points offset by (DX1, DY1) and (DX2, DY2) as the control points. After |
| 705 |
this call the current point will be offset by (DX3, DY3). |
| 706 |
|
| 707 |
Given a current point of (x, y), cairo_rel_curve_to (CR, DX1, DY1, DX2, |
| 708 |
DY2, DX3, DY3) is logically equivalent to cairo_curve_to (CR, x + DX1, y + |
| 709 |
DY1, x + DX2, y + DY2, x + DX3, y + DY3). |
| 710 |
|
| 711 |
It is an error to call this function with no current point. Doing so will |
| 712 |
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT. |
| 713 |
|
| 714 |
cr |
| 715 |
a cairo context |
| 716 |
|
| 717 |
dx1 |
| 718 |
the X offset to the first control point |
| 719 |
|
| 720 |
dy1 |
| 721 |
the Y offset to the first control point |
| 722 |
|
| 723 |
dx2 |
| 724 |
the X offset to the second control point |
| 725 |
|
| 726 |
dy2 |
| 727 |
the Y offset to the second control point |
| 728 |
|
| 729 |
dx3 |
| 730 |
the X offset to the end of the curve |
| 731 |
|
| 732 |
dy3 |
| 733 |
the Y offset to the end of the curve |
| 734 |
|
| 735 |
This documentation was automatically generated. |
| 736 |
|
| 737 |
cairo-rel-line-to |
| 738 |
- Function: cairo-rel-line-to (CR `<cairo-t>')(DX `<double>')(DY `<double>') |
| 739 |
Relative-coordinate version of `cairo-line-to'. Adds a line to the path |
| 740 |
from the current point to a point that is offset from the current point by |
| 741 |
(DX, DY) in user space. After this call the current point will be offset by |
| 742 |
(DX, DY). |
| 743 |
|
| 744 |
Given a current point of (x, y), cairo_rel_line_to(CR, DX, DY) is logically |
| 745 |
equivalent to cairo_line_to (CR, x + DX, y + DY). |
| 746 |
|
| 747 |
It is an error to call this function with no current point. Doing so will |
| 748 |
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT. |
| 749 |
|
| 750 |
cr |
| 751 |
a cairo context |
| 752 |
|
| 753 |
dx |
| 754 |
the X offset to the end of the new line |
| 755 |
|
| 756 |
dy |
| 757 |
the Y offset to the end of the new line |
| 758 |
|
| 759 |
This documentation was automatically generated. |
| 760 |
|
| 761 |
cairo-rel-move-to |
| 762 |
- Function: cairo-rel-move-to (CR `<cairo-t>')(DX `<double>')(DY `<double>') |
| 763 |
Begin a new sub-path. After this call the current point will offset by (X, |
| 764 |
Y). |
| 765 |
|
| 766 |
Given a current point of (x, y), cairo_rel_move_to(CR, DX, DY) is logically |
| 767 |
equivalent to cairo_move_to (CR, x + DX, y + DY). |
| 768 |
|
| 769 |
It is an error to call this function with no current point. Doing so will |
| 770 |
cause CR to shutdown with a status of CAIRO_STATUS_NO_CURRENT_POINT. |
| 771 |
|
| 772 |
cr |
| 773 |
a cairo context |
| 774 |
|
| 775 |
dx |
| 776 |
the X offset |
| 777 |
|
| 778 |
dy |
| 779 |
the Y offset |
| 780 |
|
| 781 |
This documentation was automatically generated. |
| 782 |
|
| 783 |
cairo-pattern-add-color-stop-rgb |
| 784 |
- Function: cairo-pattern-add-color-stop-rgb (PATTERN |
| 785 |
`<cairo-pattern-t>')(OFFSET `<double>')(RED `<double>')(GREEN `<double>')(BLUE |
| 786 |
`<double>') |
| 787 |
Adds an opaque color stop to a gradient pattern. The offset specifies the |
| 788 |
location along the gradient's control vector. For example, a linear |
| 789 |
gradient's control vector is from (x0,y0) to (x1,y1) while a radial |
| 790 |
gradient's control vector is from any point on the start circle to the |
| 791 |
corresponding point on the end circle. |
| 792 |
|
| 793 |
The color is specified in the same way as in `cairo-set-source-rgb'. |
| 794 |
|
| 795 |
Note: If the pattern is not a gradient pattern, (eg. a linear or radial |
| 796 |
pattern), then the pattern will be put into an error status with a status |
| 797 |
of `CAIRO_STATUS_PATTERN_TYPE_MISMATCH'. |
| 798 |
|
| 799 |
pattern |
| 800 |
a `<cairo-pattern-t>' |
| 801 |
|
| 802 |
offset |
| 803 |
an offset in the range [0.0 .. 1.0] |
| 804 |
|
| 805 |
red |
| 806 |
red component of color |
| 807 |
|
| 808 |
green |
| 809 |
green component of color |
| 810 |
|
| 811 |
blue |
| 812 |
blue component of color |
| 813 |
|
| 814 |
This documentation was automatically generated. |
| 815 |
|
| 816 |
cairo-pattern-add-color-stop-rgba |
| 817 |
- Function: cairo-pattern-add-color-stop-rgba (PATTERN |
| 818 |
`<cairo-pattern-t>')(OFFSET `<double>')(RED `<double>')(GREEN `<double>')(BLUE |
| 819 |
`<double>')(ALPHA `<double>') |
| 820 |
Adds a translucent color stop to a gradient pattern. The offset specifies |
| 821 |
the location along the gradient's control vector. For example, a linear |
| 822 |
gradient's control vector is from (x0,y0) to (x1,y1) while a radial |
| 823 |
gradient's control vector is from any point on the start circle to the |
| 824 |
corresponding point on the end circle. |
| 825 |
|
| 826 |
The color is specified in the same way as in `cairo-set-source-rgba'. |
| 827 |
|
| 828 |
Note: If the pattern is not a gradient pattern, (eg. a linear or radial |
| 829 |
pattern), then the pattern will be put into an error status with a status |
| 830 |
of `CAIRO_STATUS_PATTERN_TYPE_MISMATCH'. |
| 831 |
|
| 832 |
pattern |
| 833 |
a `<cairo-pattern-t>' |
| 834 |
|
| 835 |
offset |
| 836 |
an offset in the range [0.0 .. 1.0] |
| 837 |
|
| 838 |
red |
| 839 |
red component of color |
| 840 |
|
| 841 |
green |
| 842 |
green component of color |
| 843 |
|
| 844 |
blue |
| 845 |
blue component of color |
| 846 |
|
| 847 |
alpha |
| 848 |
alpha component of color |
| 849 |
|
| 850 |
This documentation was automatically generated. |
| 851 |
|
| 852 |
cairo-pattern-get-color-stop-rgba |
| 853 |
- Function: cairo-pattern-get-color-stop-rgba (PATTERN |
| 854 |
`<cairo-pattern-t>')(INDEX `<int>') ==>(RET `<cairo-status-t>')(OFFSET |
| 855 |
`<double>')(RED `<double>')(GREEN `<double>')(BLUE `<double>')(ALPHA `<double>') |
| 856 |
Gets the color and offset information at the given INDEX for a gradient |
| 857 |
pattern. Values of INDEX are 0 to 1 less than the number returned by |
| 858 |
`cairo-pattern-get-color-stop-count'. |
| 859 |
|
| 860 |
pattern |
| 861 |
a `<cairo-pattern-t>' |
| 862 |
|
| 863 |
index |
| 864 |
index of the stop to return data for |
| 865 |
|
| 866 |
offset |
| 867 |
return value for the offset of the stop, or ``#f'' |
| 868 |
|
| 869 |
red |
| 870 |
return value for red component of color, or ``#f'' |
| 871 |
|
| 872 |
green |
| 873 |
return value for green component of color, or ``#f'' |
| 874 |
|
| 875 |
blue |
| 876 |
return value for blue component of color, or ``#f'' |
| 877 |
|
| 878 |
alpha |
| 879 |
return value for alpha component of color, or ``#f'' |
| 880 |
|
| 881 |
ret |
| 882 |
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_INVALID_INDEX' if INDEX is |
| 883 |
not valid for the given pattern. If the pattern is not a gradient |
| 884 |
pattern, `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' is returned. |
| 885 |
|
| 886 |
Since 1.4 |
| 887 |
|
| 888 |
This documentation was automatically generated. |
| 889 |
|
| 890 |
cairo-pattern-create-rgb |
| 891 |
- Function: cairo-pattern-create-rgb (RED `<double>')(GREEN `<double>')(BLUE |
| 892 |
`<double>') ==>(RET `<cairo-pattern-t>') |
| 893 |
Creates a new cairo_pattern_t corresponding to an opaque color. The color |
| 894 |
components are floating point numbers in the range 0 to 1. If the values |
| 895 |
passed in are outside that range, they will be clamped. |
| 896 |
|
| 897 |
red |
| 898 |
red component of the color |
| 899 |
|
| 900 |
green |
| 901 |
green component of the color |
| 902 |
|
| 903 |
blue |
| 904 |
blue component of the color |
| 905 |
|
| 906 |
ret |
| 907 |
the newly created `<cairo-pattern-t>' if successful, or an error |
| 908 |
pattern in case of no memory. The caller owns the returned object and |
| 909 |
should call `cairo-pattern-destroy' when finished with it. This |
| 910 |
function will always return a valid pointer, but if an error occurred |
| 911 |
the pattern status will be set to an error. To inspect the status of a |
| 912 |
pattern use `cairo-pattern-status'. |
| 913 |
|
| 914 |
This documentation was automatically generated. |
| 915 |
|
| 916 |
cairo-pattern-create-rgba |
| 917 |
- Function: cairo-pattern-create-rgba (RED `<double>')(GREEN `<double>')(BLUE |
| 918 |
`<double>')(ALPHA `<double>') ==>(RET `<cairo-pattern-t>') |
| 919 |
Creates a new cairo_pattern_t corresponding to a translucent color. The |
| 920 |
color components are floating point numbers in the range 0 to 1. If the |
| 921 |
values passed in are outside that range, they will be clamped. |
| 922 |
|
| 923 |
red |
| 924 |
red component of the color |
| 925 |
|
| 926 |
green |
| 927 |
green component of the color |
| 928 |
|
| 929 |
blue |
| 930 |
blue component of the color |
| 931 |
|
| 932 |
alpha |
| 933 |
alpha component of the color |
| 934 |
|
| 935 |
ret |
| 936 |
the newly created `<cairo-pattern-t>' if successful, or an error |
| 937 |
pattern in case of no memory. The caller owns the returned object and |
| 938 |
should call `cairo-pattern-destroy' when finished with it. This |
| 939 |
function will always return a valid pointer, but if an error occurred |
| 940 |
the pattern status will be set to an error. To inspect the status of a |
| 941 |
pattern use `cairo-pattern-status'. |
| 942 |
|
| 943 |
This documentation was automatically generated. |
| 944 |
|
| 945 |
cairo-pattern-get-rgba |
| 946 |
- Function: cairo-pattern-get-rgba (PATTERN `<cairo-pattern-t>') ==>(RET |
| 947 |
`<cairo-status-t>')(RED `<double>')(GREEN `<double>')(BLUE `<double>')(ALPHA |
| 948 |
`<double>') |
| 949 |
Gets the solid color for a solid color pattern. |
| 950 |
|
| 951 |
pattern |
| 952 |
a `<cairo-pattern-t>' |
| 953 |
|
| 954 |
red |
| 955 |
return value for red component of color, or ``#f'' |
| 956 |
|
| 957 |
green |
| 958 |
return value for green component of color, or ``#f'' |
| 959 |
|
| 960 |
blue |
| 961 |
return value for blue component of color, or ``#f'' |
| 962 |
|
| 963 |
alpha |
| 964 |
return value for alpha component of color, or ``#f'' |
| 965 |
|
| 966 |
ret |
| 967 |
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if the |
| 968 |
pattern is not a solid color pattern. |
| 969 |
|
| 970 |
Since 1.4 |
| 971 |
|
| 972 |
This documentation was automatically generated. |
| 973 |
|
| 974 |
cairo-pattern-create-for-surface |
| 975 |
- Function: cairo-pattern-create-for-surface (SURFACE `<cairo-surface-t>') |
| 976 |
==>(RET `<cairo-pattern-t>') |
| 977 |
Create a new cairo_pattern_t for the given surface. |
| 978 |
|
| 979 |
surface |
| 980 |
the surface |
| 981 |
|
| 982 |
ret |
| 983 |
the newly created `<cairo-pattern-t>' if successful, or an error |
| 984 |
pattern in case of no memory. The caller owns the returned object and |
| 985 |
should call `cairo-pattern-destroy' when finished with it. This |
| 986 |
function will always return a valid pointer, but if an error occurred |
| 987 |
the pattern status will be set to an error. To inspect the status of a |
| 988 |
pattern use `cairo-pattern-status'. |
| 989 |
|
| 990 |
This documentation was automatically generated. |
| 991 |
|
| 992 |
cairo-pattern-get-surface |
| 993 |
- Function: cairo-pattern-get-surface (PATTERN `<cairo-pattern-t>') ==>(RET |
| 994 |
`<cairo-status-t>')(SURFACE `<cairo-surface-t*>') |
| 995 |
Gets the surface of a surface pattern. The reference returned in SURFACE is |
| 996 |
owned by the pattern; the caller should call `cairo-surface-reference' if |
| 997 |
the surface is to be retained. |
| 998 |
|
| 999 |
pattern |
| 1000 |
a `<cairo-pattern-t>' |
| 1001 |
|
| 1002 |
surface |
| 1003 |
return value for surface of pattern, or ``#f'' |
| 1004 |
|
| 1005 |
ret |
| 1006 |
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if the |
| 1007 |
pattern is not a surface pattern. |
| 1008 |
|
| 1009 |
Since 1.4 |
| 1010 |
|
| 1011 |
This documentation was automatically generated. |
| 1012 |
|
| 1013 |
cairo-pattern-create-linear |
| 1014 |
- Function: cairo-pattern-create-linear (X0 `<double>')(Y0 `<double>')(X1 |
| 1015 |
`<double>')(Y1 `<double>') ==>(RET `<cairo-pattern-t>') |
| 1016 |
Create a new linear gradient cairo_pattern_t along the line defined by (x0, |
| 1017 |
y0) and (x1, y1). Before using the gradient pattern, a number of color |
| 1018 |
stops should be defined using `cairo-pattern-add-color-stop-rgb' or |
| 1019 |
`cairo-pattern-add-color-stop-rgba'. |
| 1020 |
|
| 1021 |
Note: The coordinates here are in pattern space. For a new pattern, pattern |
| 1022 |
space is identical to user space, but the relationship between the spaces |
| 1023 |
can be changed with `cairo-pattern-set-matrix'. |
| 1024 |
|
| 1025 |
x0 |
| 1026 |
x coordinate of the start point |
| 1027 |
|
| 1028 |
y0 |
| 1029 |
y coordinate of the start point |
| 1030 |
|
| 1031 |
x1 |
| 1032 |
x coordinate of the end point |
| 1033 |
|
| 1034 |
y1 |
| 1035 |
y coordinate of the end point |
| 1036 |
|
| 1037 |
ret |
| 1038 |
the newly created `<cairo-pattern-t>' if successful, or an error |
| 1039 |
pattern in case of no memory. The caller owns the returned object and |
| 1040 |
should call `cairo-pattern-destroy' when finished with it. This |
| 1041 |
function will always return a valid pointer, but if an error occurred |
| 1042 |
the pattern status will be set to an error. To inspect the status of a |
| 1043 |
pattern use `cairo-pattern-status'. |
| 1044 |
|
| 1045 |
This documentation was automatically generated. |
| 1046 |
|
| 1047 |
cairo-pattern-get-linear-points |
| 1048 |
- Function: cairo-pattern-get-linear-points (PATTERN `<cairo-pattern-t>') |
| 1049 |
==>(RET `<cairo-status-t>')(X0 `<double>')(Y0 `<double>')(X1 `<double>')(Y1 |
| 1050 |
`<double>') |
| 1051 |
Gets the gradient endpoints for a linear gradient. |
| 1052 |
|
| 1053 |
pattern |
| 1054 |
a `<cairo-pattern-t>' |
| 1055 |
|
| 1056 |
x0 |
| 1057 |
return value for the x coordinate of the first point, or ``#f'' |
| 1058 |
|
| 1059 |
y0 |
| 1060 |
return value for the y coordinate of the first point, or ``#f'' |
| 1061 |
|
| 1062 |
x1 |
| 1063 |
return value for the x coordinate of the second point, or ``#f'' |
| 1064 |
|
| 1065 |
y1 |
| 1066 |
return value for the y coordinate of the second point, or ``#f'' |
| 1067 |
|
| 1068 |
ret |
| 1069 |
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if |
| 1070 |
PATTERN is not a linear gradient pattern. |
| 1071 |
|
| 1072 |
Since 1.4 |
| 1073 |
|
| 1074 |
This documentation was automatically generated. |
| 1075 |
|
| 1076 |
cairo-pattern-create-radial |
| 1077 |
- Function: cairo-pattern-create-radial (CX0 `<double>')(CY0 `<double>')(RADIUS0 |
| 1078 |
`<double>')(CX1 `<double>')(CY1 `<double>')(RADIUS1 `<double>') ==>(RET |
| 1079 |
`<cairo-pattern-t>') |
| 1080 |
Creates a new radial gradient cairo_pattern_t between the two circles |
| 1081 |
defined by (x0, y0, c0) and (x1, y1, c0). Before using the gradient |
| 1082 |
pattern, a number of color stops should be defined using |
| 1083 |
`cairo-pattern-add-color-stop-rgb' or `cairo-pattern-add-color-stop-rgba'. |
| 1084 |
|
| 1085 |
Note: The coordinates here are in pattern space. For a new pattern, pattern |
| 1086 |
space is identical to user space, but the relationship between the spaces |
| 1087 |
can be changed with `cairo-pattern-set-matrix'. |
| 1088 |
|
| 1089 |
cx0 |
| 1090 |
x coordinate for the center of the start circle |
| 1091 |
|
| 1092 |
cy0 |
| 1093 |
y coordinate for the center of the start circle |
| 1094 |
|
| 1095 |
radius0 |
| 1096 |
radius of the start circle |
| 1097 |
|
| 1098 |
cx1 |
| 1099 |
x coordinate for the center of the end circle |
| 1100 |
|
| 1101 |
cy1 |
| 1102 |
y coordinate for the center of the end circle |
| 1103 |
|
| 1104 |
radius1 |
| 1105 |
radius of the end circle |
| 1106 |
|
| 1107 |
ret |
| 1108 |
the newly created `<cairo-pattern-t>' if successful, or an error |
| 1109 |
pattern in case of no memory. The caller owns the returned object and |
| 1110 |
should call `cairo-pattern-destroy' when finished with it. This |
| 1111 |
function will always return a valid pointer, but if an error occurred |
| 1112 |
the pattern status will be set to an error. To inspect the status of a |
| 1113 |
pattern use `cairo-pattern-status'. |
| 1114 |
|
| 1115 |
This documentation was automatically generated. |
| 1116 |
|
| 1117 |
cairo-pattern-get-radial-circles |
| 1118 |
- Function: cairo-pattern-get-radial-circles (PATTERN `<cairo-pattern-t>') |
| 1119 |
==>(RET `<cairo-status-t>')(X0 `<double>')(Y0 `<double>')(R0 `<double>')(X1 |
| 1120 |
`<double>')(Y1 `<double>')(R1 `<double>') |
| 1121 |
Gets the gradient endpoint circles for a radial gradient, each specified as |
| 1122 |
a center coordinate and a radius. |
| 1123 |
|
| 1124 |
pattern |
| 1125 |
a `<cairo-pattern-t>' |
| 1126 |
|
| 1127 |
x0 |
| 1128 |
return value for the x coordinate of the center of the first circle, |
| 1129 |
or ``#f'' |
| 1130 |
|
| 1131 |
y0 |
| 1132 |
return value for the y coordinate of the center of the first circle, |
| 1133 |
or ``#f'' |
| 1134 |
|
| 1135 |
r0 |
| 1136 |
return value for the radius of the first circle, or ``#f'' |
| 1137 |
|
| 1138 |
x1 |
| 1139 |
return value for the x coordinate of the center of the second circle, |
| 1140 |
or ``#f'' |
| 1141 |
|
| 1142 |
y1 |
| 1143 |
return value for the y coordinate of the center of the second circle, |
| 1144 |
or ``#f'' |
| 1145 |
|
| 1146 |
r1 |
| 1147 |
return value for the radius of the second circle, or ``#f'' |
| 1148 |
|
| 1149 |
ret |
| 1150 |
`CAIRO_STATUS_SUCCESS', or `CAIRO_STATUS_PATTERN_TYPE_MISMATCH' if |
| 1151 |
PATTERN is not a radial gradient pattern. |
| 1152 |
|
| 1153 |
Since 1.4 |
| 1154 |
|
| 1155 |
This documentation was automatically generated. |
| 1156 |
|
| 1157 |
cairo-pattern-set-extend |
| 1158 |
- Function: cairo-pattern-set-extend (PATTERN `<cairo-pattern-t>')(EXTEND |
| 1159 |
`<cairo-extend-t>') |
| 1160 |
Sets the mode to be used for drawing outside the area of a pattern. See |
| 1161 |
`<cairo-extend-t>' for details on the semantics of each extend strategy. |
| 1162 |
|
| 1163 |
pattern |
| 1164 |
a `<cairo-pattern-t>' |
| 1165 |
|
| 1166 |
extend |
| 1167 |
a `<cairo-extend-t>' describing how the area outside of the pattern |
| 1168 |
will be drawn |
| 1169 |
|
| 1170 |
This documentation was automatically generated. |
| 1171 |
|
| 1172 |
cairo-pattern-get-extend |
| 1173 |
- Function: cairo-pattern-get-extend (PATTERN `<cairo-pattern-t>') ==>(RET |
| 1174 |
`<cairo-extend-t>') |
| 1175 |
Gets the current extend mode for a pattern. See `<cairo-extend-t>' for |
| 1176 |
details on the semantics of each extend strategy. |
| 1177 |
|
| 1178 |
pattern |
| 1179 |
a `<cairo-pattern-t>' |
| 1180 |
|
| 1181 |
ret |
| 1182 |
the current extend strategy used for drawing the pattern. |
| 1183 |
|
| 1184 |
This documentation was automatically generated. |
| 1185 |
|
| 1186 |
cairo-pattern-set-filter |
| 1187 |
- Function: cairo-pattern-set-filter (PATTERN `<cairo-pattern-t>')(FILTER |
| 1188 |
`<cairo-filter-t>') |
| 1189 |
Sets the filter to be used for resizing when using this pattern. See |
| 1190 |
`<cairo-filter-t>' for details on each filter. |
| 1191 |
|
| 1192 |
pattern |
| 1193 |
a `<cairo-pattern-t>' |
| 1194 |
|
| 1195 |
filter |
| 1196 |
a `<cairo-filter-t>' describing the filter to use for resizing the |
| 1197 |
pattern |
| 1198 |
|
| 1199 |
This documentation was automatically generated. |
| 1200 |
|
| 1201 |
cairo-pattern-get-filter |
| 1202 |
- Function: cairo-pattern-get-filter (PATTERN `<cairo-pattern-t>') ==>(RET |
| 1203 |
`<cairo-filter-t>') |
| 1204 |
Gets the current filter for a pattern. See `<cairo-filter-t>' for details |
| 1205 |
on each filter. |
| 1206 |
|
| 1207 |
pattern |
| 1208 |
a `<cairo-pattern-t>' |
| 1209 |
|
| 1210 |
ret |
| 1211 |
the current filter used for resizing the pattern. |
| 1212 |
|
| 1213 |
This documentation was automatically generated. |
| 1214 |
|
| 1215 |
cairo-pattern-set-matrix |
| 1216 |
- Function: cairo-pattern-set-matrix (PATTERN `<cairo-pattern-t>')(MATRIX |
| 1217 |
`<cairo-matrix-t>') |
| 1218 |
Sets the pattern's transformation matrix to MATRIX. This matrix is a |
| 1219 |
transformation from user space to pattern space. |
| 1220 |
|
| 1221 |
When a pattern is first created it always has the identity matrix for its |
| 1222 |
transformation matrix, which means that pattern space is initially |
| 1223 |
identical to user space. |
| 1224 |
|
| 1225 |
Important: Please note that the direction of this transformation matrix is |
| 1226 |
from user space to pattern space. This means that if you imagine the flow |
| 1227 |
from a pattern to user space (and on to device space), then coordinates in |
| 1228 |
that flow will be transformed by the inverse of the pattern matrix. |
| 1229 |
|
| 1230 |
For example, if you want to make a pattern appear twice as large as it does |
| 1231 |
by default the correct code to use is: |
| 1232 |
|
| 1233 |
|
| 1234 |
cairo_matrix_init_scale (&matrix, 0.5, 0.5); |
| 1235 |
cairo_pattern_set_matrix (pattern, &matrix); |
| 1236 |
|
| 1237 |
|
| 1238 |
Meanwhile, using values of 2.0 rather than 0.5 in the code above would |
| 1239 |
cause the pattern to appear at half of its default size. |
| 1240 |
|
| 1241 |
Also, please note the discussion of the user-space locking semantics of |
| 1242 |
`cairo-set-source'. |
| 1243 |
|
| 1244 |
pattern |
| 1245 |
a `<cairo-pattern-t>' |
| 1246 |
|
| 1247 |
matrix |
| 1248 |
a `<cairo-matrix-t>' |
| 1249 |
|
| 1250 |
This documentation was automatically generated. |
| 1251 |
|
| 1252 |
cairo-pattern-get-matrix |
| 1253 |
- Function: cairo-pattern-get-matrix (PATTERN `<cairo-pattern-t>')(MATRIX |
| 1254 |
`<cairo-matrix-t>') |
| 1255 |
Stores the pattern's transformation matrix into MATRIX. |
| 1256 |
|
| 1257 |
pattern |
| 1258 |
a `<cairo-pattern-t>' |
| 1259 |
|
| 1260 |
matrix |
| 1261 |
return value for the matrix |
| 1262 |
|
| 1263 |
This documentation was automatically generated. |
| 1264 |
|
| 1265 |
cairo-pattern-get-type |
| 1266 |
- Function: cairo-pattern-get-type (PATTERN `<cairo-pattern-t>') ==>(RET |
| 1267 |
`<cairo-pattern-type-t>') |
| 1268 |
This function returns the type a pattern. See `<cairo-pattern-type-t>' for |
| 1269 |
available types. |
| 1270 |
|
| 1271 |
pattern |
| 1272 |
a `<cairo-pattern-t>' |
| 1273 |
|
| 1274 |
ret |
| 1275 |
The type of PATTERN. |
| 1276 |
|
| 1277 |
Since 1.2 |
| 1278 |
|
| 1279 |
This documentation was automatically generated. |
| 1280 |
|
| 1281 |
cairo-pdf-surface-create |
| 1282 |
- Function: cairo-pdf-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS |
| 1283 |
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>') |
| 1284 |
Creates a PDF surface of the specified size in points to be written to |
| 1285 |
FILENAME. |
| 1286 |
|
| 1287 |
filename |
| 1288 |
a filename for the PDF output (must be writable) |
| 1289 |
|
| 1290 |
width-in-points |
| 1291 |
width of the surface, in points (1 point == 1/72.0 inch) |
| 1292 |
|
| 1293 |
height-in-points |
| 1294 |
height of the surface, in points (1 point == 1/72.0 inch) |
| 1295 |
|
| 1296 |
ret |
| 1297 |
a pointer to the newly created surface. The caller owns the surface |
| 1298 |
and should call cairo_surface_destroy when done with it. This function |
| 1299 |
always returns a valid pointer, but it will return a pointer to a |
| 1300 |
"nil" surface if an error such as out of memory occurs. You can use |
| 1301 |
`cairo-surface-status' to check for this. |
| 1302 |
|
| 1303 |
Since 1.2 |
| 1304 |
|
| 1305 |
This documentation was automatically generated. |
| 1306 |
|
| 1307 |
cairo-pdf-surface-set-size |
| 1308 |
- Function: cairo-pdf-surface-set-size (SURFACE |
| 1309 |
`<cairo-surface-t>')(WIDTH-IN-POINTS `<double>')(HEIGHT-IN-POINTS `<double>') |
| 1310 |
Changes the size of a PDF surface for the current (and subsequent) pages. |
| 1311 |
|
| 1312 |
This function should only be called before any drawing operations have been |
| 1313 |
performed on the current page. The simplest way to do this is to call this |
| 1314 |
function immediately after creating the surface or immediately after |
| 1315 |
completing a page with either `cairo-show-page' or `cairo-copy-page'. |
| 1316 |
|
| 1317 |
surface |
| 1318 |
a PDF cairo_surface_t |
| 1319 |
|
| 1320 |
width-in-points |
| 1321 |
new surface width, in points (1 point == 1/72.0 inch) |
| 1322 |
|
| 1323 |
height-in-points |
| 1324 |
new surface height, in points (1 point == 1/72.0 inch) |
| 1325 |
|
| 1326 |
Since 1.2 |
| 1327 |
|
| 1328 |
This documentation was automatically generated. |
| 1329 |
|
| 1330 |
cairo-image-surface-create-from-png |
| 1331 |
- Function: cairo-image-surface-create-from-png (FILENAME `<char>') ==>(RET |
| 1332 |
`<cairo-surface-t>') |
| 1333 |
Creates a new image surface and initializes the contents to the given PNG |
| 1334 |
file. |
| 1335 |
|
| 1336 |
filename |
| 1337 |
name of PNG file to load |
| 1338 |
|
| 1339 |
ret |
| 1340 |
a new `<cairo-surface-t>' initialized with the contents of the PNG |
| 1341 |
file, or a "nil" surface if any error occurred. A nil surface can be |
| 1342 |
checked for with cairo_surface_status(surface) which may return one of |
| 1343 |
the following values: CAIRO_STATUS_NO_MEMORY |
| 1344 |
CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR |
| 1345 |
|
| 1346 |
This documentation was automatically generated. |
| 1347 |
|
| 1348 |
cairo-surface-write-to-png |
| 1349 |
- Function: cairo-surface-write-to-png (SURFACE `<cairo-surface-t>')(FILENAME |
| 1350 |
`<char>') ==>(RET `<cairo-status-t>') |
| 1351 |
Writes the contents of SURFACE to a new file FILENAME as a PNG image. |
| 1352 |
|
| 1353 |
surface |
| 1354 |
a `<cairo-surface-t>' with pixel contents |
| 1355 |
|
| 1356 |
filename |
| 1357 |
the name of a file to write to |
| 1358 |
|
| 1359 |
ret |
| 1360 |
CAIRO_STATUS_SUCCESS if the PNG file was written successfully. |
| 1361 |
Otherwise, CAIRO_STATUS_NO_MEMORY if memory could not be allocated for |
| 1362 |
the operation or CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface |
| 1363 |
does not have pixel contents, or CAIRO_STATUS_WRITE_ERROR if an I/O |
| 1364 |
error occurs while attempting to write the file. |
| 1365 |
|
| 1366 |
This documentation was automatically generated. |
| 1367 |
|
| 1368 |
cairo-ps-surface-create |
| 1369 |
- Function: cairo-ps-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS |
| 1370 |
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>') |
| 1371 |
Creates a PostScript surface of the specified size in points to be written |
| 1372 |
to FILENAME. See `cairo-ps-surface-create-for-stream' for a more flexible |
| 1373 |
mechanism for handling the PostScript output than simply writing it to a |
| 1374 |
named file. |
| 1375 |
|
| 1376 |
Note that the size of individual pages of the PostScript output can vary. |
| 1377 |
See `cairo-ps-surface-set-size'. |
| 1378 |
|
| 1379 |
filename |
| 1380 |
a filename for the PS output (must be writable) |
| 1381 |
|
| 1382 |
width-in-points |
| 1383 |
width of the surface, in points (1 point == 1/72.0 inch) |
| 1384 |
|
| 1385 |
height-in-points |
| 1386 |
height of the surface, in points (1 point == 1/72.0 inch) |
| 1387 |
|
| 1388 |
ret |
| 1389 |
a pointer to the newly created surface. The caller owns the surface |
| 1390 |
and should call cairo_surface_destroy when done with it. This function |
| 1391 |
always returns a valid pointer, but it will return a pointer to a |
| 1392 |
"nil" surface if an error such as out of memory occurs. You can use |
| 1393 |
`cairo-surface-status' to check for this. |
| 1394 |
|
| 1395 |
Since 1.2 |
| 1396 |
|
| 1397 |
This documentation was automatically generated. |
| 1398 |
|
| 1399 |
cairo-ps-surface-set-size |
| 1400 |
- Function: cairo-ps-surface-set-size (SURFACE |
| 1401 |
`<cairo-surface-t>')(WIDTH-IN-POINTS `<double>')(HEIGHT-IN-POINTS `<double>') |
| 1402 |
Changes the size of a PostScript surface for the current (and subsequent) |
| 1403 |
pages. |
| 1404 |
|
| 1405 |
This function should only be called before any drawing operations have been |
| 1406 |
performed on the current page. The simplest way to do this is to call this |
| 1407 |
function immediately after creating the surface or immediately after |
| 1408 |
completing a page with either `cairo-show-page' or `cairo-copy-page'. |
| 1409 |
|
| 1410 |
surface |
| 1411 |
a PostScript cairo_surface_t |
| 1412 |
|
| 1413 |
width-in-points |
| 1414 |
new surface width, in points (1 point == 1/72.0 inch) |
| 1415 |
|
| 1416 |
height-in-points |
| 1417 |
new surface height, in points (1 point == 1/72.0 inch) |
| 1418 |
|
| 1419 |
Since 1.2 |
| 1420 |
|
| 1421 |
This documentation was automatically generated. |
| 1422 |
|
| 1423 |
cairo-ps-surface-dsc-comment |
| 1424 |
- Function: cairo-ps-surface-dsc-comment (SURFACE `<cairo-surface-t>')(COMMENT |
| 1425 |
`<char>') |
| 1426 |
Emit a comment into the PostScript output for the given surface. |
| 1427 |
|
| 1428 |
The comment is expected to conform to the PostScript Language Document |
| 1429 |
Structuring Conventions (DSC). Please see that manual for details on the |
| 1430 |
available comments and their meanings. In particular, the %`IncludeFeature' |
| 1431 |
comment allows a device-independent means of controlling printer device |
| 1432 |
features. So the PostScript Printer Description Files Specification will |
| 1433 |
also be a useful reference. |
| 1434 |
|
| 1435 |
The comment string must begin with a percent character (%) and the total |
| 1436 |
length of the string (including any initial percent characters) must not |
| 1437 |
exceed 255 characters. Violating either of these conditions will place |
| 1438 |
SURFACE into an error state. But beyond these two conditions, this function |
| 1439 |
will not enforce conformance of the comment with any particular |
| 1440 |
specification. |
| 1441 |
|
| 1442 |
The comment string should not have a trailing newline. |
| 1443 |
|
| 1444 |
The DSC specifies different sections in which particular comments can |
| 1445 |
appear. This function provides for comments to be emitted within three |
| 1446 |
sections: the header, the Setup section, and the PageSetup section. |
| 1447 |
Comments appearing in the first two sections apply to the entire document |
| 1448 |
while comments in the BeginPageSetup section apply only to a single page. |
| 1449 |
|
| 1450 |
For comments to appear in the header section, this function should be |
| 1451 |
called after the surface is created, but before a call to |
| 1452 |
`cairo-ps-surface-begin-setup'. |
| 1453 |
|
| 1454 |
For comments to appear in the Setup section, this function should be called |
| 1455 |
after a call to `cairo-ps-surface-begin-setup' but before a call to |
| 1456 |
`cairo-ps-surface-begin-page-setup'. |
| 1457 |
|
| 1458 |
For comments to appear in the PageSetup section, this function should be |
| 1459 |
called after a call to `cairo-ps-surface-begin-page-setup'. |
| 1460 |
|
| 1461 |
Note that it is only necessary to call `cairo-ps-surface-begin-page-setup' |
| 1462 |
for the first page of any surface. After a call to `cairo-show-page' or |
| 1463 |
`cairo-copy-page' comments are unambiguously directed to the PageSetup |
| 1464 |
section of the current page. But it doesn't hurt to call this function at |
| 1465 |
the beginning of every page as that consistency may make the calling code |
| 1466 |
simpler. |
| 1467 |
|
| 1468 |
As a final note, cairo automatically generates several comments on its own. |
| 1469 |
As such, applications must not manually generate any of the following |
| 1470 |
comments: |
| 1471 |
|
| 1472 |
Header section: %!PS-Adobe-3.0, %`Creator', %`CreationDate', %`Pages', |
| 1473 |
%`BoundingBox', %`DocumentData', %`LanguageLevel', %`EndComments'. |
| 1474 |
|
| 1475 |
Setup section: %`BeginSetup', %`EndSetup' |
| 1476 |
|
| 1477 |
PageSetup section: %`BeginPageSetup', %`PageBoundingBox', %`EndPageSetup'. |
| 1478 |
|
| 1479 |
Other sections: %`BeginProlog', %`EndProlog', %`Page', %`Trailer', %`EOF' |
| 1480 |
|
| 1481 |
Here is an example sequence showing how this function might be used: |
| 1482 |
|
| 1483 |
|
| 1484 |
cairo_surface_t *surface = cairo_ps_surface_create (filename, width, height); |
| 1485 |
... |
| 1486 |
cairo_ps_surface_dsc_comment (surface, "%%Title: My excellent document"); |
| 1487 |
cairo_ps_surface_dsc_comment (surface, "%%Copyright: Copyright (C) 2006 Cairo Lover") |
| 1488 |
... |
| 1489 |
cairo_ps_surface_dsc_begin_setup (surface); |
| 1490 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor White"); |
| 1491 |
... |
| 1492 |
cairo_ps_surface_dsc_begin_page_setup (surface); |
| 1493 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A3"); |
| 1494 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *InputSlot LargeCapacity"); |
| 1495 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaType Glossy"); |
| 1496 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *MediaColor Blue"); |
| 1497 |
... draw to first page here .. |
| 1498 |
cairo_show_page (cr); |
| 1499 |
... |
| 1500 |
cairo_ps_surface_dsc_comment (surface, "%%IncludeFeature: *PageSize A5"); |
| 1501 |
... |
| 1502 |
|
| 1503 |
|
| 1504 |
surface |
| 1505 |
a PostScript cairo_surface_t |
| 1506 |
|
| 1507 |
comment |
| 1508 |
a comment string to be emitted into the PostScript output |
| 1509 |
|
| 1510 |
Since 1.2 |
| 1511 |
|
| 1512 |
This documentation was automatically generated. |
| 1513 |
|
| 1514 |
cairo-scaled-font-create |
| 1515 |
- Function: cairo-scaled-font-create (FONT-FACE |
| 1516 |
`<cairo-font-face-t>')(FONT-MATRIX `<cairo-matrix-t>')(CTM |
| 1517 |
`<cairo-matrix-t>')(OPTIONS `<cairo-font-options-t>') ==>(RET |
| 1518 |
`<cairo-scaled-font-t>') |
| 1519 |
Creates a `<cairo-scaled-font-t>' object from a font face and matrices that |
| 1520 |
describe the size of the font and the environment in which it will be used. |
| 1521 |
|
| 1522 |
font-face |
| 1523 |
a `<cairo-font-face-t>' |
| 1524 |
|
| 1525 |
font-matrix |
| 1526 |
font space to user space transformation matrix for the font. In the |
| 1527 |
simplest case of a N point font, this matrix is just a scale by N, but |
| 1528 |
it can also be used to shear the font or stretch it unequally along |
| 1529 |
the two axes. See `cairo-set-font-matrix'. |
| 1530 |
|
| 1531 |
ctm |
| 1532 |
user to device transformation matrix with which the font will be used. |
| 1533 |
|
| 1534 |
options |
| 1535 |
options to use when getting metrics for the font and rendering with |
| 1536 |
it. |
| 1537 |
|
| 1538 |
ret |
| 1539 |
a newly created `<cairo-scaled-font-t>'. Destroy with |
| 1540 |
`cairo-scaled-font-destroy' |
| 1541 |
|
| 1542 |
This documentation was automatically generated. |
| 1543 |
|
| 1544 |
cairo-scaled-font-extents |
| 1545 |
- Function: cairo-scaled-font-extents (SCALED-FONT |
| 1546 |
`<cairo-scaled-font-t>')(EXTENTS `<cairo-font-extents-t>') |
| 1547 |
Gets the metrics for a `<cairo-scaled-font-t>'. |
| 1548 |
|
| 1549 |
scaled-font |
| 1550 |
a `<cairo-scaled-font-t>' |
| 1551 |
|
| 1552 |
extents |
| 1553 |
a `<cairo-font-extents-t>' which to store the retrieved extents. |
| 1554 |
|
| 1555 |
This documentation was automatically generated. |
| 1556 |
|
| 1557 |
cairo-scaled-font-text-extents |
| 1558 |
- Function: cairo-scaled-font-text-extents (SCALED-FONT |
| 1559 |
`<cairo-scaled-font-t>')(UTF8 `<char>')(EXTENTS `<cairo-text-extents-t>') |
| 1560 |
Gets the extents for a string of text. The extents describe a user-space |
| 1561 |
rectangle that encloses the "inked" portion of the text drawn at the origin |
| 1562 |
(0,0) (as it would be drawn by `cairo-show-text' if the cairo graphics |
| 1563 |
state were set to the same font_face, font_matrix, ctm, and font_options as |
| 1564 |
SCALED-FONT). Additionally, the x_advance and y_advance values indicate the |
| 1565 |
amount by which the current point would be advanced by `cairo-show-text'. |
| 1566 |
|
| 1567 |
Note that whitespace characters do not directly contribute to the size of |
| 1568 |
the rectangle (extents.width and extents.height). They do contribute |
| 1569 |
indirectly by changing the position of non-whitespace characters. In |
| 1570 |
particular, trailing whitespace characters are likely to not affect the |
| 1571 |
size of the rectangle, though they will affect the x_advance and y_advance |
| 1572 |
values. |
| 1573 |
|
| 1574 |
scaled-font |
| 1575 |
a `<cairo-scaled-font-t>' |
| 1576 |
|
| 1577 |
utf8 |
| 1578 |
a string of text, encoded in UTF-8 |
| 1579 |
|
| 1580 |
extents |
| 1581 |
a `<cairo-text-extents-t>' which to store the retrieved extents. |
| 1582 |
|
| 1583 |
Since 1.2 |
| 1584 |
|
| 1585 |
This documentation was automatically generated. |
| 1586 |
|
| 1587 |
cairo-scaled-font-glyph-extents |
| 1588 |
- Function: cairo-scaled-font-glyph-extents (SCALED-FONT |
| 1589 |
`<cairo-scaled-font-t>')(GLYPHS `<cairo-glyph-t>')(NUM-GLYPHS `<int>')(EXTENTS |
| 1590 |
`<cairo-text-extents-t>') |
| 1591 |
Gets the extents for an array of glyphs. The extents describe a user-space |
| 1592 |
rectangle that encloses the "inked" portion of the glyphs, (as they would |
| 1593 |
be drawn by `cairo-show-glyphs' if the cairo graphics state were set to the |
| 1594 |
same font_face, font_matrix, ctm, and font_options as SCALED-FONT). |
| 1595 |
Additionally, the x_advance and y_advance values indicate the amount by |
| 1596 |
which the current point would be advanced by cairo_show_glyphs. |
| 1597 |
|
| 1598 |
Note that whitespace glyphs do not contribute to the size of the rectangle |
| 1599 |
(extents.width and extents.height). |
| 1600 |
|
| 1601 |
scaled-font |
| 1602 |
a `<cairo-scaled-font-t>' |
| 1603 |
|
| 1604 |
glyphs |
| 1605 |
an array of glyph IDs with X and Y offsets. |
| 1606 |
|
| 1607 |
num-glyphs |
| 1608 |
the number of glyphs in the GLYPHS array |
| 1609 |
|
| 1610 |
extents |
| 1611 |
a `<cairo-text-extents-t>' which to store the retrieved extents. |
| 1612 |
|
| 1613 |
This documentation was automatically generated. |
| 1614 |
|
| 1615 |
cairo-scaled-font-get-font-face |
| 1616 |
- Function: cairo-scaled-font-get-font-face (SCALED-FONT |
| 1617 |
`<cairo-scaled-font-t>') ==>(RET `<cairo-font-face-t>') |
| 1618 |
Gets the font face that this scaled font was created for. |
| 1619 |
|
| 1620 |
scaled-font |
| 1621 |
a `<cairo-scaled-font-t>' |
| 1622 |
|
| 1623 |
ret |
| 1624 |
The `<cairo-font-face-t>' with which SCALED-FONT was created. |
| 1625 |
|
| 1626 |
Since 1.2 |
| 1627 |
|
| 1628 |
This documentation was automatically generated. |
| 1629 |
|
| 1630 |
cairo-scaled-font-get-font-options |
| 1631 |
- Function: cairo-scaled-font-get-font-options (SCALED-FONT |
| 1632 |
`<cairo-scaled-font-t>')(OPTIONS `<cairo-font-options-t>') |
| 1633 |
Stores the font options with which SCALED-FONT was created into OPTIONS. |
| 1634 |
|
| 1635 |
scaled-font |
| 1636 |
a `<cairo-scaled-font-t>' |
| 1637 |
|
| 1638 |
options |
| 1639 |
return value for the font options |
| 1640 |
|
| 1641 |
Since 1.2 |
| 1642 |
|
| 1643 |
This documentation was automatically generated. |
| 1644 |
|
| 1645 |
cairo-scaled-font-get-font-matrix |
| 1646 |
- Function: cairo-scaled-font-get-font-matrix (SCALED-FONT |
| 1647 |
`<cairo-scaled-font-t>')(FONT-MATRIX `<cairo-matrix-t>') |
| 1648 |
Stores the font matrix with which SCALED-FONT was created into MATRIX. |
| 1649 |
|
| 1650 |
scaled-font |
| 1651 |
a `<cairo-scaled-font-t>' |
| 1652 |
|
| 1653 |
font-matrix |
| 1654 |
return value for the matrix |
| 1655 |
|
| 1656 |
Since 1.2 |
| 1657 |
|
| 1658 |
This documentation was automatically generated. |
| 1659 |
|
| 1660 |
cairo-scaled-font-get-ctm |
| 1661 |
- Function: cairo-scaled-font-get-ctm (SCALED-FONT `<cairo-scaled-font-t>')(CTM |
| 1662 |
`<cairo-matrix-t>') |
| 1663 |
Stores the CTM with which SCALED-FONT was created into CTM. |
| 1664 |
|
| 1665 |
scaled-font |
| 1666 |
a `<cairo-scaled-font-t>' |
| 1667 |
|
| 1668 |
ctm |
| 1669 |
return value for the CTM |
| 1670 |
|
| 1671 |
Since 1.2 |
| 1672 |
|
| 1673 |
This documentation was automatically generated. |
| 1674 |
|
| 1675 |
cairo-scaled-font-get-type |
| 1676 |
- Function: cairo-scaled-font-get-type (SCALED-FONT `<cairo-scaled-font-t>') |
| 1677 |
==>(RET `<cairo-font-type-t>') |
| 1678 |
This function returns the type of the backend used to create a scaled font. |
| 1679 |
See `<cairo-font-type-t>' for available types. |
| 1680 |
|
| 1681 |
scaled-font |
| 1682 |
a `<cairo-scaled-font-t>' |
| 1683 |
|
| 1684 |
ret |
| 1685 |
The type of SCALED-FONT. |
| 1686 |
|
| 1687 |
Since 1.2 |
| 1688 |
|
| 1689 |
This documentation was automatically generated. |
| 1690 |
|
| 1691 |
cairo-surface-create-similar |
| 1692 |
- Function: cairo-surface-create-similar (OTHER `<cairo-surface-t>')(CONTENT |
| 1693 |
`<cairo-content-t>')(WIDTH `<int>')(HEIGHT `<int>') ==>(RET `<cairo-surface-t>') |
| 1694 |
Create a new surface that is as compatible as possible with an existing |
| 1695 |
surface. For example the new surface will have the same fallback resolution |
| 1696 |
and font options as OTHER. Generally, the new surface will also use the |
| 1697 |
same backend as OTHER, unless that is not possible for some reason. The |
| 1698 |
type of the returned surface may be examined with `cairo-surface-get-type'. |
| 1699 |
|
| 1700 |
Initially the surface contents are all 0 (transparent if contents have |
| 1701 |
transparency, black otherwise.) |
| 1702 |
|
| 1703 |
other |
| 1704 |
an existing surface used to select the backend of the new surface |
| 1705 |
|
| 1706 |
content |
| 1707 |
the content for the new surface |
| 1708 |
|
| 1709 |
width |
| 1710 |
width of the new surface, (in device-space units) |
| 1711 |
|
| 1712 |
height |
| 1713 |
height of the new surface (in device-space units) |
| 1714 |
|
| 1715 |
ret |
| 1716 |
a pointer to the newly allocated surface. The caller owns the surface |
| 1717 |
and should call cairo_surface_destroy when done with it. This function |
| 1718 |
always returns a valid pointer, but it will return a pointer to a |
| 1719 |
"nil" surface if OTHER is already in an error state or any other error |
| 1720 |
occurs. |
| 1721 |
|
| 1722 |
This documentation was automatically generated. |
| 1723 |
|
| 1724 |
cairo-surface-finish |
| 1725 |
- Function: cairo-surface-finish (SURFACE `<cairo-surface-t>') |
| 1726 |
This function finishes the surface and drops all references to external |
| 1727 |
resources. For example, for the Xlib backend it means that cairo will no |
| 1728 |
longer access the drawable, which can be freed. After calling |
| 1729 |
`cairo-surface-finish' the only valid operations on a surface are getting |
| 1730 |
and setting user data and referencing and destroying it. Further drawing to |
| 1731 |
the surface will not affect the surface but will instead trigger a |
| 1732 |
CAIRO_STATUS_SURFACE_FINISHED error. |
| 1733 |
|
| 1734 |
When the last call to `cairo-surface-destroy' decreases the reference count |
| 1735 |
to zero, cairo will call `cairo-surface-finish' if it hasn't been called |
| 1736 |
already, before freeing the resources associated with the surface. |
| 1737 |
|
| 1738 |
surface |
| 1739 |
the `<cairo-surface-t>' to finish |
| 1740 |
|
| 1741 |
This documentation was automatically generated. |
| 1742 |
|
| 1743 |
cairo-surface-flush |
| 1744 |
- Function: cairo-surface-flush (SURFACE `<cairo-surface-t>') |
| 1745 |
Do any pending drawing for the surface and also restore any temporary |
| 1746 |
modification's cairo has made to the surface's state. This function must be |
| 1747 |
called before switching from drawing on the surface with cairo to drawing |
| 1748 |
on it directly with native APIs. If the surface doesn't support direct |
| 1749 |
access, then this function does nothing. |
| 1750 |
|
| 1751 |
surface |
| 1752 |
a `<cairo-surface-t>' |
| 1753 |
|
| 1754 |
This documentation was automatically generated. |
| 1755 |
|
| 1756 |
cairo-surface-get-font-options |
| 1757 |
- Function: cairo-surface-get-font-options (SURFACE `<cairo-surface-t>')(OPTIONS |
| 1758 |
`<cairo-font-options-t>') |
| 1759 |
Retrieves the default font rendering options for the surface. This allows |
| 1760 |
display surfaces to report the correct subpixel order for rendering on |
| 1761 |
them, print surfaces to disable hinting of metrics and so forth. The result |
| 1762 |
can then be used with `cairo-scaled-font-create'. |
| 1763 |
|
| 1764 |
surface |
| 1765 |
a `<cairo-surface-t>' |
| 1766 |
|
| 1767 |
options |
| 1768 |
a `<cairo-font-options-t>' object into which to store the retrieved |
| 1769 |
options. All existing values are overwritten |
| 1770 |
|
| 1771 |
This documentation was automatically generated. |
| 1772 |
|
| 1773 |
cairo-surface-get-content |
| 1774 |
- Function: cairo-surface-get-content (SURFACE `<cairo-surface-t>') ==>(RET |
| 1775 |
`<cairo-content-t>') |
| 1776 |
This function returns the content type of SURFACE which indicates whether |
| 1777 |
the surface contains color and/or alpha information. See |
| 1778 |
`<cairo-content-t>'. |
| 1779 |
|
| 1780 |
surface |
| 1781 |
a `<cairo-surface-t>' |
| 1782 |
|
| 1783 |
ret |
| 1784 |
The content type of SURFACE. |
| 1785 |
|
| 1786 |
Since 1.2 |
| 1787 |
|
| 1788 |
This documentation was automatically generated. |
| 1789 |
|
| 1790 |
cairo-surface-mark-dirty |
| 1791 |
- Function: cairo-surface-mark-dirty (SURFACE `<cairo-surface-t>') |
| 1792 |
Tells cairo that drawing has been done to surface using means other than |
| 1793 |
cairo, and that cairo should reread any cached areas. Note that you must |
| 1794 |
call `cairo-surface-flush' before doing such drawing. |
| 1795 |
|
| 1796 |
surface |
| 1797 |
a `<cairo-surface-t>' |
| 1798 |
|
| 1799 |
This documentation was automatically generated. |
| 1800 |
|
| 1801 |
cairo-surface-mark-dirty-rectangle |
| 1802 |
- Function: cairo-surface-mark-dirty-rectangle (SURFACE `<cairo-surface-t>')(X |
| 1803 |
`<int>')(Y `<int>')(WIDTH `<int>')(HEIGHT `<int>') |
| 1804 |
Like `cairo-surface-mark-dirty', but drawing has been done only to the |
| 1805 |
specified rectangle, so that cairo can retain cached contents for other |
| 1806 |
parts of the surface. |
| 1807 |
|
| 1808 |
Any cached clip set on the surface will be reset by this function, to make |
| 1809 |
sure that future cairo calls have the clip set that they expect. |
| 1810 |
|
| 1811 |
surface |
| 1812 |
a `<cairo-surface-t>' |
| 1813 |
|
| 1814 |
x |
| 1815 |
X coordinate of dirty rectangle |
| 1816 |
|
| 1817 |
y |
| 1818 |
Y coordinate of dirty rectangle |
| 1819 |
|
| 1820 |
width |
| 1821 |
width of dirty rectangle |
| 1822 |
|
| 1823 |
height |
| 1824 |
height of dirty rectangle |
| 1825 |
|
| 1826 |
This documentation was automatically generated. |
| 1827 |
|
| 1828 |
cairo-surface-set-device-offset |
| 1829 |
- Function: cairo-surface-set-device-offset (SURFACE |
| 1830 |
`<cairo-surface-t>')(X-OFFSET `<double>')(Y-OFFSET `<double>') |
| 1831 |
Sets an offset that is added to the device coordinates determined by the |
| 1832 |
CTM when drawing to SURFACE. One use case for this function is when we want |
| 1833 |
to create a `<cairo-surface-t>' that redirects drawing for a portion of an |
| 1834 |
onscreen surface to an offscreen surface in a way that is completely |
| 1835 |
invisible to the user of the cairo API. Setting a transformation via |
| 1836 |
`cairo-translate' isn't sufficient to do this, since functions like |
| 1837 |
`cairo-device-to-user' will expose the hidden offset. |
| 1838 |
|
| 1839 |
Note that the offset affects drawing to the surface as well as using the |
| 1840 |
surface in a source pattern. |
| 1841 |
|
| 1842 |
surface |
| 1843 |
a `<cairo-surface-t>' |
| 1844 |
|
| 1845 |
x-offset |
| 1846 |
the offset in the X direction, in device units |
| 1847 |
|
| 1848 |
y-offset |
| 1849 |
the offset in the Y direction, in device units |
| 1850 |
|
| 1851 |
This documentation was automatically generated. |
| 1852 |
|
| 1853 |
cairo-surface-get-device-offset |
| 1854 |
- Function: cairo-surface-get-device-offset (SURFACE `<cairo-surface-t>') |
| 1855 |
==>(X-OFFSET `<double>')(Y-OFFSET `<double>') |
| 1856 |
This function returns the previous device offset set by |
| 1857 |
`cairo-surface-set-device-offset'. |
| 1858 |
|
| 1859 |
surface |
| 1860 |
a `<cairo-surface-t>' |
| 1861 |
|
| 1862 |
x-offset |
| 1863 |
the offset in the X direction, in device units |
| 1864 |
|
| 1865 |
y-offset |
| 1866 |
the offset in the Y direction, in device units |
| 1867 |
|
| 1868 |
Since 1.2 |
| 1869 |
|
| 1870 |
This documentation was automatically generated. |
| 1871 |
|
| 1872 |
cairo-surface-get-type |
| 1873 |
- Function: cairo-surface-get-type (SURFACE `<cairo-surface-t>') ==>(RET |
| 1874 |
`<cairo-surface-type-t>') |
| 1875 |
This function returns the type of the backend used to create a surface. See |
| 1876 |
`<cairo-surface-type-t>' for available types. |
| 1877 |
|
| 1878 |
surface |
| 1879 |
a `<cairo-surface-t>' |
| 1880 |
|
| 1881 |
ret |
| 1882 |
The type of SURFACE. |
| 1883 |
|
| 1884 |
Since 1.2 |
| 1885 |
|
| 1886 |
This documentation was automatically generated. |
| 1887 |
|
| 1888 |
cairo-svg-surface-create |
| 1889 |
- Function: cairo-svg-surface-create (FILENAME `<char>')(WIDTH-IN-POINTS |
| 1890 |
`<double>')(HEIGHT-IN-POINTS `<double>') ==>(RET `<cairo-surface-t>') |
| 1891 |
Creates a SVG surface of the specified size in points to be written to |
| 1892 |
FILENAME. |
| 1893 |
|
| 1894 |
filename |
| 1895 |
a filename for the SVG output (must be writable) |
| 1896 |
|
| 1897 |
width-in-points |
| 1898 |
width of the surface, in points (1 point == 1/72.0 inch) |
| 1899 |
|
| 1900 |
height-in-points |
| 1901 |
height of the surface, in points (1 point == 1/72.0 inch) |
| 1902 |
|
| 1903 |
ret |
| 1904 |
a pointer to the newly created surface. The caller owns the surface |
| 1905 |
and should call cairo_surface_destroy when done with it. This function |
| 1906 |
always returns a valid pointer, but it will return a pointer to a |
| 1907 |
"nil" surface if an error such as out of memory occurs. You can use |
| 1908 |
`cairo-surface-status' to check for this. |
| 1909 |
|
| 1910 |
Since 1.2 |
| 1911 |
|
| 1912 |
This documentation was automatically generated. |
| 1913 |
|
| 1914 |
cairo-select-font-face |
| 1915 |
- Function: cairo-select-font-face (CR `<cairo-t>')(FAMILY `<char>')(SLANT |
| 1916 |
`<cairo-font-slant-t>')(WEIGHT `<cairo-font-weight-t>') |
| 1917 |
Selects a family and style of font from a simplified description as a |
| 1918 |
family name, slant and weight. This function is meant to be used only for |
| 1919 |
applications with simple font needs: Cairo doesn't provide for operations |
| 1920 |
such as listing all available fonts on the system, and it is expected that |
| 1921 |
most applications will need to use a more comprehensive font handling and |
| 1922 |
text layout library in addition to cairo. |
| 1923 |
|
| 1924 |
cr |
| 1925 |
a `<cairo-t>' |
| 1926 |
|
| 1927 |
family |
| 1928 |
a font family name, encoded in UTF-8 |
| 1929 |
|
| 1930 |
slant |
| 1931 |
the slant for the font |
| 1932 |
|
| 1933 |
weight |
| 1934 |
the weight for the font |
| 1935 |
|
| 1936 |
This documentation was automatically generated. |
| 1937 |
|
| 1938 |
cairo-set-font-size |
| 1939 |
- Function: cairo-set-font-size (CR `<cairo-t>')(SIZE `<double>') |
| 1940 |
Sets the current font matrix to a scale by a factor of SIZE, replacing any |
| 1941 |
font matrix previously set with `cairo-set-font-size' or |
| 1942 |
`cairo-set-font-matrix'. This results in a font size of SIZE user space |
| 1943 |
units. (More precisely, this matrix will result in the font's em-square |
| 1944 |
being a SIZE by SIZE square in user space.) |
| 1945 |
|
| 1946 |
cr |
| 1947 |
a `<cairo-t>' |
| 1948 |
|
| 1949 |
size |
| 1950 |
the new font size, in user space units |
| 1951 |
|
| 1952 |
This documentation was automatically generated. |
| 1953 |
|
| 1954 |
cairo-set-font-matrix |
| 1955 |
- Function: cairo-set-font-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>') |
| 1956 |
Sets the current font matrix to MATRIX. The font matrix gives a |
| 1957 |
transformation from the design space of the font (in this space, the |
| 1958 |
em-square is 1 unit by 1 unit) to user space. Normally, a simple scale is |
| 1959 |
used (see `cairo-set-font-size'), but a more complex font matrix can be |
| 1960 |
used to shear the font or stretch it unequally along the two axes |
| 1961 |
|
| 1962 |
cr |
| 1963 |
a `<cairo-t>' |
| 1964 |
|
| 1965 |
matrix |
| 1966 |
a `<cairo-matrix-t>' describing a transform to be applied to the |
| 1967 |
current font. |
| 1968 |
|
| 1969 |
This documentation was automatically generated. |
| 1970 |
|
| 1971 |
cairo-get-font-matrix |
| 1972 |
- Function: cairo-get-font-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>') |
| 1973 |
Stores the current font matrix into MATRIX. See `cairo-set-font-matrix'. |
| 1974 |
|
| 1975 |
cr |
| 1976 |
a `<cairo-t>' |
| 1977 |
|
| 1978 |
matrix |
| 1979 |
return value for the matrix |
| 1980 |
|
| 1981 |
This documentation was automatically generated. |
| 1982 |
|
| 1983 |
cairo-set-font-options |
| 1984 |
- Function: cairo-set-font-options (CR `<cairo-t>')(OPTIONS |
| 1985 |
`<cairo-font-options-t>') |
| 1986 |
Sets a set of custom font rendering options for the `<cairo-t>'. Rendering |
| 1987 |
options are derived by merging these options with the options derived from |
| 1988 |
underlying surface; if the value in OPTIONS has a default value (like |
| 1989 |
`CAIRO_ANTIALIAS_DEFAULT'), then the value from the surface is used. |
| 1990 |
|
| 1991 |
cr |
| 1992 |
a `<cairo-t>' |
| 1993 |
|
| 1994 |
options |
| 1995 |
font options to use |
| 1996 |
|
| 1997 |
This documentation was automatically generated. |
| 1998 |
|
| 1999 |
cairo-get-font-options |
| 2000 |
- Function: cairo-get-font-options (CR `<cairo-t>')(OPTIONS |
| 2001 |
`<cairo-font-options-t>') |
| 2002 |
Retrieves font rendering options set via `<cairo-set-font-options>'. Note |
| 2003 |
that the returned options do not include any options derived from the |
| 2004 |
underlying surface; they are literally the options passed to |
| 2005 |
`cairo-set-font-options'. |
| 2006 |
|
| 2007 |
cr |
| 2008 |
a `<cairo-t>' |
| 2009 |
|
| 2010 |
options |
| 2011 |
a `<cairo-font-options-t>' object into which to store the retrieved |
| 2012 |
options. All existing values are overwritten |
| 2013 |
|
| 2014 |
This documentation was automatically generated. |
| 2015 |
|
| 2016 |
cairo-set-font-face |
| 2017 |
- Function: cairo-set-font-face (CR `<cairo-t>')(FONT-FACE |
| 2018 |
`<cairo-font-face-t>') |
| 2019 |
Replaces the current `<cairo-font-face-t>' object in the `<cairo-t>' with |
| 2020 |
FONT-FACE. The replaced font face in the `<cairo-t>' will be destroyed if |
| 2021 |
there are no other references to it. |
| 2022 |
|
| 2023 |
cr |
| 2024 |
a `<cairo-t>' |
| 2025 |
|
| 2026 |
font-face |
| 2027 |
a `<cairo-font-face-t>', or ``#f'' to restore to the default font |
| 2028 |
|
| 2029 |
This documentation was automatically generated. |
| 2030 |
|
| 2031 |
cairo-get-font-face |
| 2032 |
- Function: cairo-get-font-face (CR `<cairo-t>') ==>(RET `<cairo-font-face-t>') |
| 2033 |
Gets the current font face for a `<cairo-t>'. |
| 2034 |
|
| 2035 |
cr |
| 2036 |
a `<cairo-t>' |
| 2037 |
|
| 2038 |
ret |
| 2039 |
the current font face. This object is owned by cairo. To keep a |
| 2040 |
reference to it, you must call cairo_font_face_reference. This |
| 2041 |
function never returns ``#f''. If memory cannot be allocated, a |
| 2042 |
special "nil" `<cairo-font-face-t>' object will be returned on which |
| 2043 |
`cairo-font-face-status' returns `CAIRO_STATUS_NO_MEMORY'. Using this |
| 2044 |
nil object will cause its error state to propagate to other objects it |
| 2045 |
is passed to, (for example, calling `cairo-set-font-face' with a nil |
| 2046 |
font will trigger an error that will shutdown the cairo_t object). |
| 2047 |
|
| 2048 |
This documentation was automatically generated. |
| 2049 |
|
| 2050 |
cairo-set-scaled-font |
| 2051 |
- Function: cairo-set-scaled-font (CR `<cairo-t>')(SCALED-FONT |
| 2052 |
`<cairo-scaled-font-t>') |
| 2053 |
Replaces the current font face, font matrix, and font options in the |
| 2054 |
`<cairo-t>' with those of the `<cairo-scaled-font-t>'. Except for some |
| 2055 |
translation, the current CTM of the `<cairo-t>' should be the same as that |
| 2056 |
of the `<cairo-scaled-font-t>', which can be accessed using |
| 2057 |
`cairo-scaled-font-get-ctm'. |
| 2058 |
|
| 2059 |
cr |
| 2060 |
a `<cairo-t>' |
| 2061 |
|
| 2062 |
scaled-font |
| 2063 |
a `<cairo-scaled-font-t>' |
| 2064 |
|
| 2065 |
Since 1.2 |
| 2066 |
|
| 2067 |
This documentation was automatically generated. |
| 2068 |
|
| 2069 |
cairo-get-scaled-font |
| 2070 |
- Function: cairo-get-scaled-font (CR `<cairo-t>') ==>(RET |
| 2071 |
`<cairo-scaled-font-t>') |
| 2072 |
Gets the current scaled font for a `<cairo-t>'. |
| 2073 |
|
| 2074 |
cr |
| 2075 |
a `<cairo-t>' |
| 2076 |
|
| 2077 |
ret |
| 2078 |
the current scaled font. This object is owned by cairo. To keep a |
| 2079 |
reference to it, you must call `cairo-scaled-font-reference'. This |
| 2080 |
function never returns ``#f''. If memory cannot be allocated, a |
| 2081 |
special "nil" `<cairo-scaled-font-t>' object will be returned on which |
| 2082 |
`cairo-scaled-font-status' returns `CAIRO_STATUS_NO_MEMORY'. Using |
| 2083 |
this nil object will cause its error state to propagate to other |
| 2084 |
objects it is passed to, (for example, calling `cairo-set-scaled-font' |
| 2085 |
with a nil font will trigger an error that will shutdown the cairo_t |
| 2086 |
object). |
| 2087 |
|
| 2088 |
Since 1.4 |
| 2089 |
|
| 2090 |
This documentation was automatically generated. |
| 2091 |
|
| 2092 |
cairo-show-text |
| 2093 |
- Function: cairo-show-text (CR `<cairo-t>')(UTF8 `<char>') |
| 2094 |
A drawing operator that generates the shape from a string of UTF-8 |
| 2095 |
characters, rendered according to the current font_face, font_size |
| 2096 |
(font_matrix), and font_options. |
| 2097 |
|
| 2098 |
This function first computes a set of glyphs for the string of text. The |
| 2099 |
first glyph is placed so that its origin is at the current point. The |
| 2100 |
origin of each subsequent glyph is offset from that of the previous glyph |
| 2101 |
by the advance values of the previous glyph. |
| 2102 |
|
| 2103 |
After this call the current point is moved to the origin of where the next |
| 2104 |
glyph would be placed in this same progression. That is, the current point |
| 2105 |
will be at the origin of the final glyph offset by its advance values. This |
| 2106 |
allows for easy display of a single logical string with multiple calls to |
| 2107 |
`cairo-show-text'. |
| 2108 |
|
| 2109 |
NOTE: The `cairo-show-text' function call is part of what the cairo |
| 2110 |
designers call the "toy" text API. It is convenient for short demos and |
| 2111 |
simple programs, but it is not expected to be adequate for serious |
| 2112 |
text-using applications. See `cairo-show-glyphs' for the "real" text |
| 2113 |
display API in cairo. |
| 2114 |
|
| 2115 |
cr |
| 2116 |
a cairo context |
| 2117 |
|
| 2118 |
utf8 |
| 2119 |
a string of text encoded in UTF-8 |
| 2120 |
|
| 2121 |
This documentation was automatically generated. |
| 2122 |
|
| 2123 |
cairo-show-glyphs |
| 2124 |
- Function: cairo-show-glyphs (CR `<cairo-t>')(GLYPHS |
| 2125 |
`<cairo-glyph-t>')(NUM-GLYPHS `<int>') |
| 2126 |
A drawing operator that generates the shape from an array of glyphs, |
| 2127 |
rendered according to the current font_face, font_size (font_matrix), and |
| 2128 |
font_options. |
| 2129 |
|
| 2130 |
cr |
| 2131 |
a cairo context |
| 2132 |
|
| 2133 |
glyphs |
| 2134 |
array of glyphs to show |
| 2135 |
|
| 2136 |
num-glyphs |
| 2137 |
number of glyphs to show |
| 2138 |
|
| 2139 |
This documentation was automatically generated. |
| 2140 |
|
| 2141 |
cairo-font-extents |
| 2142 |
- Function: cairo-font-extents (CR `<cairo-t>')(EXTENTS |
| 2143 |
`<cairo-font-extents-t>') |
| 2144 |
Gets the font extents for the currently selected font. |
| 2145 |
|
| 2146 |
cr |
| 2147 |
a `<cairo-t>' |
| 2148 |
|
| 2149 |
extents |
| 2150 |
a `<cairo-font-extents-t>' object into which the results will be |
| 2151 |
stored. |
| 2152 |
|
| 2153 |
This documentation was automatically generated. |
| 2154 |
|
| 2155 |
cairo-text-extents |
| 2156 |
- Function: cairo-text-extents (CR `<cairo-t>')(UTF8 `<char>')(EXTENTS |
| 2157 |
`<cairo-text-extents-t>') |
| 2158 |
Gets the extents for a string of text. The extents describe a user-space |
| 2159 |
rectangle that encloses the "inked" portion of the text, (as it would be |
| 2160 |
drawn by `cairo-show-text'). Additionally, the x_advance and y_advance |
| 2161 |
values indicate the amount by which the current point would be advanced by |
| 2162 |
`cairo-show-text'. |
| 2163 |
|
| 2164 |
Note that whitespace characters do not directly contribute to the size of |
| 2165 |
the rectangle (extents.width and extents.height). They do contribute |
| 2166 |
indirectly by changing the position of non-whitespace characters. In |
| 2167 |
particular, trailing whitespace characters are likely to not affect the |
| 2168 |
size of the rectangle, though they will affect the x_advance and y_advance |
| 2169 |
values. |
| 2170 |
|
| 2171 |
cr |
| 2172 |
a `<cairo-t>' |
| 2173 |
|
| 2174 |
utf8 |
| 2175 |
a string of text, encoded in UTF-8 |
| 2176 |
|
| 2177 |
extents |
| 2178 |
a `<cairo-text-extents-t>' object into which the results will be |
| 2179 |
stored |
| 2180 |
|
| 2181 |
This documentation was automatically generated. |
| 2182 |
|
| 2183 |
cairo-glyph-extents |
| 2184 |
- Function: cairo-glyph-extents (CR `<cairo-t>')(GLYPHS |
| 2185 |
`<cairo-glyph-t>')(NUM-GLYPHS `<int>')(EXTENTS `<cairo-text-extents-t>') |
| 2186 |
Gets the extents for an array of glyphs. The extents describe a user-space |
| 2187 |
rectangle that encloses the "inked" portion of the glyphs, (as they would |
| 2188 |
be drawn by `cairo-show-glyphs'). Additionally, the x_advance and y_advance |
| 2189 |
values indicate the amount by which the current point would be advanced by |
| 2190 |
cairo_show_glyphs. |
| 2191 |
|
| 2192 |
Note that whitespace glyphs do not contribute to the size of the rectangle |
| 2193 |
(extents.width and extents.height). |
| 2194 |
|
| 2195 |
cr |
| 2196 |
a `<cairo-t>' |
| 2197 |
|
| 2198 |
glyphs |
| 2199 |
an array of `<cairo-glyph-t>' objects |
| 2200 |
|
| 2201 |
num-glyphs |
| 2202 |
the number of elements in GLYPHS |
| 2203 |
|
| 2204 |
extents |
| 2205 |
a `<cairo-text-extents-t>' object into which the results will be |
| 2206 |
stored |
| 2207 |
|
| 2208 |
This documentation was automatically generated. |
| 2209 |
|
| 2210 |
cairo-translate |
| 2211 |
- Function: cairo-translate (CR `<cairo-t>')(TX `<double>')(TY `<double>') |
| 2212 |
Modifies the current transformation matrix (CTM) by translating the |
| 2213 |
user-space origin by (TX, TY). This offset is interpreted as a user-space |
| 2214 |
coordinate according to the CTM in place before the new call to |
| 2215 |
cairo_translate. In other words, the translation of the user-space origin |
| 2216 |
takes place after any existing transformation. |
| 2217 |
|
| 2218 |
cr |
| 2219 |
a cairo context |
| 2220 |
|
| 2221 |
tx |
| 2222 |
amount to translate in the X direction |
| 2223 |
|
| 2224 |
ty |
| 2225 |
amount to translate in the Y direction |
| 2226 |
|
| 2227 |
This documentation was automatically generated. |
| 2228 |
|
| 2229 |
cairo-scale |
| 2230 |
- Function: cairo-scale (CR `<cairo-t>')(SX `<double>')(SY `<double>') |
| 2231 |
Modifies the current transformation matrix (CTM) by scaling the X and Y |
| 2232 |
user-space axes by SX and SY respectively. The scaling of the axes takes |
| 2233 |
place after any existing transformation of user space. |
| 2234 |
|
| 2235 |
cr |
| 2236 |
a cairo context |
| 2237 |
|
| 2238 |
sx |
| 2239 |
scale factor for the X dimension |
| 2240 |
|
| 2241 |
sy |
| 2242 |
scale factor for the Y dimension |
| 2243 |
|
| 2244 |
This documentation was automatically generated. |
| 2245 |
|
| 2246 |
cairo-rotate |
| 2247 |
- Function: cairo-rotate (CR `<cairo-t>')(ANGLE `<double>') |
| 2248 |
Modifies the current transformation matrix (CTM) by rotating the user-space |
| 2249 |
axes by ANGLE radians. The rotation of the axes takes places after any |
| 2250 |
existing transformation of user space. The rotation direction for positive |
| 2251 |
angles is from the positive X axis toward the positive Y axis. |
| 2252 |
|
| 2253 |
cr |
| 2254 |
a cairo context |
| 2255 |
|
| 2256 |
angle |
| 2257 |
angle (in radians) by which the user-space axes will be rotated |
| 2258 |
|
| 2259 |
This documentation was automatically generated. |
| 2260 |
|
| 2261 |
cairo-transform |
| 2262 |
- Function: cairo-transform (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>') |
| 2263 |
Modifies the current transformation matrix (CTM) by applying MATRIX as an |
| 2264 |
additional transformation. The new transformation of user space takes place |
| 2265 |
after any existing transformation. |
| 2266 |
|
| 2267 |
cr |
| 2268 |
a cairo context |
| 2269 |
|
| 2270 |
matrix |
| 2271 |
a transformation to be applied to the user-space axes |
| 2272 |
|
| 2273 |
This documentation was automatically generated. |
| 2274 |
|
| 2275 |
cairo-set-matrix |
| 2276 |
- Function: cairo-set-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>') |
| 2277 |
Modifies the current transformation matrix (CTM) by setting it equal to |
| 2278 |
MATRIX. |
| 2279 |
|
| 2280 |
cr |
| 2281 |
a cairo context |
| 2282 |
|
| 2283 |
matrix |
| 2284 |
a transformation matrix from user space to device space |
| 2285 |
|
| 2286 |
This documentation was automatically generated. |
| 2287 |
|
| 2288 |
cairo-get-matrix |
| 2289 |
- Function: cairo-get-matrix (CR `<cairo-t>')(MATRIX `<cairo-matrix-t>') |
| 2290 |
Stores the current transformation matrix (CTM) into MATRIX. |
| 2291 |
|
| 2292 |
cr |
| 2293 |
a cairo context |
| 2294 |
|
| 2295 |
matrix |
| 2296 |
return value for the matrix |
| 2297 |
|
| 2298 |
This documentation was automatically generated. |
| 2299 |
|
| 2300 |
cairo-identity-matrix |
| 2301 |
- Function: cairo-identity-matrix (CR `<cairo-t>') |
| 2302 |
Resets the current transformation matrix (CTM) by setting it equal to the |
| 2303 |
identity matrix. That is, the user-space and device-space axes will be |
| 2304 |
aligned and one user-space unit will transform to one device-space unit. |
| 2305 |
|
| 2306 |
cr |
| 2307 |
a cairo context |
| 2308 |
|
| 2309 |
This documentation was automatically generated. |
| 2310 |
|
| 2311 |
cairo-user-to-device |
| 2312 |
- Function: cairo-user-to-device (CR `<cairo-t>') ==>(X `<double>')(Y |
| 2313 |
`<double>') |
| 2314 |
Transform a coordinate from user space to device space by multiplying the |
| 2315 |
given point by the current transformation matrix (CTM). |
| 2316 |
|
| 2317 |
cr |
| 2318 |
a cairo context |
| 2319 |
|
| 2320 |
x |
| 2321 |
X value of coordinate (in/out parameter) |
| 2322 |
|
| 2323 |
y |
| 2324 |
Y value of coordinate (in/out parameter) |
| 2325 |
|
| 2326 |
This documentation was automatically generated. |
| 2327 |
|
| 2328 |
cairo-user-to-device-distance |
| 2329 |
- Function: cairo-user-to-device-distance (CR `<cairo-t>') ==>(DX `<double>')(DY |
| 2330 |
`<double>') |
| 2331 |
Transform a distance vector from user space to device space. This function |
| 2332 |
is similar to `cairo-user-to-device' except that the translation components |
| 2333 |
of the CTM will be ignored when transforming (DX,DY). |
| 2334 |
|
| 2335 |
cr |
| 2336 |
a cairo context |
| 2337 |
|
| 2338 |
dx |
| 2339 |
X component of a distance vector (in/out parameter) |
| 2340 |
|
| 2341 |
dy |
| 2342 |
Y component of a distance vector (in/out parameter) |
| 2343 |
|
| 2344 |
This documentation was automatically generated. |
| 2345 |
|
| 2346 |
cairo-device-to-user |
| 2347 |
- Function: cairo-device-to-user (CR `<cairo-t>') ==>(X `<double>')(Y |
| 2348 |
`<double>') |
| 2349 |
Transform a coordinate from device space to user space by multiplying the |
| 2350 |
given point by the inverse of the current transformation matrix (CTM). |
| 2351 |
|
| 2352 |
cr |
| 2353 |
a cairo |
| 2354 |
|
| 2355 |
x |
| 2356 |
X value of coordinate (in/out parameter) |
| 2357 |
|
| 2358 |
y |
| 2359 |
Y value of coordinate (in/out parameter) |
| 2360 |
|
| 2361 |
This documentation was automatically generated. |
| 2362 |
|
| 2363 |
cairo-device-to-user-distance |
| 2364 |
- Function: cairo-device-to-user-distance (CR `<cairo-t>') ==>(DX `<double>')(DY |
| 2365 |
`<double>') |
| 2366 |
Transform a distance vector from device space to user space. This function |
| 2367 |
is similar to `cairo-device-to-user' except that the translation components |
| 2368 |
of the inverse CTM will be ignored when transforming (DX,DY). |
| 2369 |
|
| 2370 |
cr |
| 2371 |
a cairo context |
| 2372 |
|
| 2373 |
dx |
| 2374 |
X component of a distance vector (in/out parameter) |
| 2375 |
|
| 2376 |
dy |
| 2377 |
Y component of a distance vector (in/out parameter) |
| 2378 |
|
| 2379 |
This documentation was automatically generated. |
| 2380 |
|
| 2381 |
cairo-version |
| 2382 |
- Function: cairo-version ==>(RET `<int>') |
| 2383 |
Returns the version of the cairo library encoded in a single integer as per |
| 2384 |
CAIRO_VERSION_ENCODE. The encoding ensures that later versions compare |
| 2385 |
greater than earlier versions. |
| 2386 |
|
| 2387 |
A run-time comparison to check that cairo's version is greater than or |
| 2388 |
equal to version X.Y.Z could be performed as follows: |
| 2389 |
|
| 2390 |
|
| 2391 |
if (cairo_version() >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...} |
| 2392 |
|
| 2393 |
|
| 2394 |
See also `cairo-version-string' as well as the compile-time equivalents |
| 2395 |
`CAIRO_VERSION' and `CAIRO_VERSION_STRING'. |
| 2396 |
|
| 2397 |
ret |
| 2398 |
the encoded version. |
| 2399 |
|
| 2400 |
This documentation was automatically generated. |
| 2401 |
|
| 2402 |
cairo-version-string |
| 2403 |
- Function: cairo-version-string ==>(RET `<char>') |
| 2404 |
Returns the version of the cairo library as a human-readable string of the |
| 2405 |
form "X.Y.Z". |
| 2406 |
|
| 2407 |
See also `cairo-version' as well as the compile-time equivalents |
| 2408 |
`CAIRO_VERSION_STRING' and `CAIRO_VERSION'. |
| 2409 |
|
| 2410 |
ret |
| 2411 |
a string containing the version. |
| 2412 |
|
| 2413 |
This documentation was automatically generated. |
| 2414 |
|
| 2415 |
cairo-create |
| 2416 |
- Function: cairo-create (TARGET `<cairo-surface-t>') ==>(RET `<cairo-t>') |
| 2417 |
Creates a new `<cairo-t>' with all graphics state parameters set to default |
| 2418 |
values and with TARGET as a target surface. The target surface should be |
| 2419 |
constructed with a backend-specific function such as |
| 2420 |
`cairo-image-surface-create' (or any other `cairo_<backend>_surface_create' |
| 2421 |
variant). |
| 2422 |
|
| 2423 |
This function references TARGET, so you can immediately call |
| 2424 |
`cairo-surface-destroy' on it if you don't need to maintain a separate |
| 2425 |
reference to it. |
| 2426 |
|
| 2427 |
target |
| 2428 |
target surface for the context |
| 2429 |
|
| 2430 |
ret |
| 2431 |
a newly allocated `<cairo-t>' with a reference count of 1. The initial |
| 2432 |
reference count should be released with `cairo-destroy' when you are |
| 2433 |
done using the `<cairo-t>'. This function never returns ``#f''. If |
| 2434 |
memory cannot be allocated, a special `<cairo-t>' object will be |
| 2435 |
returned on which `cairo-status' returns `CAIRO_STATUS_NO_MEMORY'. You |
| 2436 |
can use this object normally, but no drawing will be done. |
| 2437 |
|
| 2438 |
This documentation was automatically generated. |
| 2439 |
|
| 2440 |
cairo-save |
| 2441 |
- Function: cairo-save (CR `<cairo-t>') |
| 2442 |
Makes a copy of the current state of CR and saves it on an internal stack |
| 2443 |
of saved states for CR. When `cairo-restore' is called, CR will be restored |
| 2444 |
to the saved state. Multiple calls to `cairo-save' and `cairo-restore' can |
| 2445 |
be nested; each call to `cairo-restore' restores the state from the |
| 2446 |
matching paired `cairo-save'. |
| 2447 |
|
| 2448 |
It isn't necessary to clear all saved states before a `<cairo-t>' is freed. |
| 2449 |
If the reference count of a `<cairo-t>' drops to zero in response to a call |
| 2450 |
to `cairo-destroy', any saved states will be freed along with the |
| 2451 |
`<cairo-t>'. |
| 2452 |
|
| 2453 |
cr |
| 2454 |
a `<cairo-t>' |
| 2455 |
|
| 2456 |
This documentation was automatically generated. |
| 2457 |
|
| 2458 |
cairo-restore |
| 2459 |
- Function: cairo-restore (CR `<cairo-t>') |
| 2460 |
Restores CR to the state saved by a preceding call to `cairo-save' and |
| 2461 |
removes that state from the stack of saved states. |
| 2462 |
|
| 2463 |
cr |
| 2464 |
a `<cairo-t>' |
| 2465 |
|
| 2466 |
This documentation was automatically generated. |
| 2467 |
|
| 2468 |
cairo-get-target |
| 2469 |
- Function: cairo-get-target (CR `<cairo-t>') ==>(RET `<cairo-surface-t>') |
| 2470 |
Gets the target surface for the cairo context as passed to `cairo-create'. |
| 2471 |
|
| 2472 |
This function will always return a valid pointer, but the result can be a |
| 2473 |
"nil" surface if CR is already in an error state, (ie. |
| 2474 |
`cairo-status'`!='`CAIRO_STATUS_SUCCESS'). A nil surface is indicated by |
| 2475 |
`cairo-surface-status'`!='`CAIRO_STATUS_SUCCESS'. |
| 2476 |
|
| 2477 |
cr |
| 2478 |
a cairo context |
| 2479 |
|
| 2480 |
ret |
| 2481 |
the target surface. This object is owned by cairo. To keep a reference |
| 2482 |
to it, you must call `cairo-surface-reference'. |
| 2483 |
|
| 2484 |
This documentation was automatically generated. |
| 2485 |
|
| 2486 |
cairo-push-group |
| 2487 |
- Function: cairo-push-group (CR `<cairo-t>') |
| 2488 |
Temporarily redirects drawing to an intermediate surface known as a group. |
| 2489 |
The redirection lasts until the group is completed by a call to |
| 2490 |
`cairo-pop-group' or `cairo-pop-group-to-source'. These calls provide the |
| 2491 |
result of any drawing to the group as a pattern, (either as an explicit |
| 2492 |
object, or set as the source pattern). |
| 2493 |
|
| 2494 |
This group functionality can be convenient for performing intermediate |
| 2495 |
compositing. One common use of a group is to render objects as opaque |
| 2496 |
within the group, (so that they occlude each other), and then blend the |
| 2497 |
result with translucence onto the destination. |
| 2498 |
|
| 2499 |
Groups can be nested arbitrarily deep by making balanced calls to |
| 2500 |
`cairo-push-group'/`cairo-pop-group'. Each call pushes/pops the new target |
| 2501 |
group onto/from a stack. |
| 2502 |
|
| 2503 |
The `cairo-push-group' function calls `cairo-save' so that any changes to |
| 2504 |
the graphics state will not be visible outside the group, (the pop_group |
| 2505 |
functions call `cairo-restore'). |
| 2506 |
|
| 2507 |
By default the intermediate group will have a content type of |
| 2508 |
CAIRO_CONTENT_COLOR_ALPHA. Other content types can be chosen for the group |
| 2509 |
by using `cairo-push-group-with-content' instead. |
| 2510 |
|
| 2511 |
As an example, here is how one might fill and stroke a path with |
| 2512 |
translucence, but without any portion of the fill being visible under the |
| 2513 |
stroke: |
| 2514 |
|
| 2515 |
|
| 2516 |
cairo_push_group (cr); |
| 2517 |
cairo_set_source (cr, fill_pattern); |
| 2518 |
cairo_fill_preserve (cr); |
| 2519 |
cairo_set_source (cr, stroke_pattern); |
| 2520 |
cairo_stroke (cr); |
| 2521 |
cairo_pop_group_to_source (cr); |
| 2522 |
cairo_paint_with_alpha (cr, alpha); |
| 2523 |
|
| 2524 |
|
| 2525 |
cr |
| 2526 |
a cairo context |
| 2527 |
|
| 2528 |
Since 1.2 |
| 2529 |
|
| 2530 |
This documentation was automatically generated. |
| 2531 |
|
| 2532 |
cairo-pop-group |
| 2533 |
- Function: cairo-pop-group (CR `<cairo-t>') ==>(RET `<cairo-pattern-t>') |
| 2534 |
Terminates the redirection begun by a call to `cairo-push-group' or |
| 2535 |
`cairo-push-group-with-content' and returns a new pattern containing the |
| 2536 |
results of all drawing operations performed to the group. |
| 2537 |
|
| 2538 |
The `cairo-pop-group' function calls `cairo-restore', (balancing a call to |
| 2539 |
`cairo-save' by the push_group function), so that any changes to the |
| 2540 |
graphics state will not be visible outside the group. |
| 2541 |
|
| 2542 |
cr |
| 2543 |
a cairo context |
| 2544 |
|
| 2545 |
ret |
| 2546 |
a newly created (surface) pattern containing the results of all |
| 2547 |
drawing operations performed to the group. The caller owns the |
| 2548 |
returned object and should call `cairo-pattern-destroy' when finished |
| 2549 |
with it. |
| 2550 |
|
| 2551 |
Since 1.2 |
| 2552 |
|
| 2553 |
This documentation was automatically generated. |
| 2554 |
|
| 2555 |
cairo-pop-group-to-source |
| 2556 |
- Function: cairo-pop-group-to-source (CR `<cairo-t>') |
| 2557 |
Terminates the redirection begun by a call to `cairo-push-group' or |
| 2558 |
`cairo-push-group-with-content' and installs the resulting pattern as the |
| 2559 |
source pattern in the given cairo context. |
| 2560 |
|
| 2561 |
The behavior of this function is equivalent to the sequence of operations: |
| 2562 |
|
| 2563 |
|
| 2564 |
cairo_pattern_t *group = cairo_pop_group (cr); |
| 2565 |
cairo_set_source (cr, group); |
| 2566 |
cairo_pattern_destroy (group); |
| 2567 |
|
| 2568 |
|
| 2569 |
but is more convenient as their is no need for a variable to store the |
| 2570 |
short-lived pointer to the pattern. |
| 2571 |
|
| 2572 |
The `cairo-pop-group' function calls `cairo-restore', (balancing a call to |
| 2573 |
`cairo-save' by the push_group function), so that any changes to the |
| 2574 |
graphics state will not be visible outside the group. |
| 2575 |
|
| 2576 |
cr |
| 2577 |
a cairo context |
| 2578 |
|
| 2579 |
Since 1.2 |
| 2580 |
|
| 2581 |
This documentation was automatically generated. |
| 2582 |
|
| 2583 |
cairo-get-group-target |
| 2584 |
- Function: cairo-get-group-target (CR `<cairo-t>') ==>(RET `<cairo-surface-t>') |
| 2585 |
Gets the target surface for the current group as started by the most recent |
| 2586 |
call to `cairo-push-group' or `cairo-push-group-with-content'. |
| 2587 |
|
| 2588 |
This function will return NULL if called "outside" of any group rendering |
| 2589 |
blocks, (that is, after the last balancing call to `cairo-pop-group' or |
| 2590 |
`cairo-pop-group-to-source'). |
| 2591 |
|
| 2592 |
cr |
| 2593 |
a cairo context |
| 2594 |
|
| 2595 |
ret |
| 2596 |
the target group surface, or NULL if none. This object is owned by |
| 2597 |
cairo. To keep a reference to it, you must call |
| 2598 |
`cairo-surface-reference'. |
| 2599 |
|
| 2600 |
Since 1.2 |
| 2601 |
|
| 2602 |
This documentation was automatically generated. |
| 2603 |
|
| 2604 |
cairo-set-source-rgb |
| 2605 |
- Function: cairo-set-source-rgb (CR `<cairo-t>')(RED `<double>')(GREEN |
| 2606 |
`<double>')(BLUE `<double>') |
| 2607 |
Sets the source pattern within CR to an opaque color. This opaque color |
| 2608 |
will then be used for any subsequent drawing operation until a new source |
| 2609 |
pattern is set. |
| 2610 |
|
| 2611 |
The color components are floating point numbers in the range 0 to 1. If the |
| 2612 |
values passed in are outside that range, they will be clamped. |
| 2613 |
|
| 2614 |
cr |
| 2615 |
a cairo context |
| 2616 |
|
| 2617 |
red |
| 2618 |
red component of color |
| 2619 |
|
| 2620 |
green |
| 2621 |
green component of color |
| 2622 |
|
| 2623 |
blue |
| 2624 |
blue component of color |
| 2625 |
|
| 2626 |
This documentation was automatically generated. |
| 2627 |
|
| 2628 |
cairo-set-source-rgba |
| 2629 |
- Function: cairo-set-source-rgba (CR `<cairo-t>')(RED `<double>')(GREEN |
| 2630 |
`<double>')(BLUE `<double>')(ALPHA `<double>') |
| 2631 |
Sets the source pattern within CR to a translucent color. This color will |
| 2632 |
then be used for any subsequent drawing operation until a new source |
| 2633 |
pattern is set. |
| 2634 |
|
| 2635 |
The color and alpha components are floating point numbers in the range 0 to |
| 2636 |
1. If the values passed in are outside that range, they will be clamped. |
| 2637 |
|
| 2638 |
cr |
| 2639 |
a cairo context |
| 2640 |
|
| 2641 |
red |
| 2642 |
red component of color |
| 2643 |
|
| 2644 |
green |
| 2645 |
green component of color |
| 2646 |
|
| 2647 |
blue |
| 2648 |
blue component of color |
| 2649 |
|
| 2650 |
alpha |
| 2651 |
alpha component of color |
| 2652 |
|
| 2653 |
This documentation was automatically generated. |
| 2654 |
|
| 2655 |
cairo-set-source |
| 2656 |
- Function: cairo-set-source (CR `<cairo-t>')(SOURCE `<cairo-pattern-t>') |
| 2657 |
Sets the source pattern within CR to SOURCE. This pattern will then be used |
| 2658 |
for any subsequent drawing operation until a new source pattern is set. |
| 2659 |
|
| 2660 |
Note: The pattern's transformation matrix will be locked to the user space |
| 2661 |
in effect at the time of `cairo-set-source'. This means that further |
| 2662 |
modifications of the current transformation matrix will not affect the |
| 2663 |
source pattern. See `cairo-pattern-set-matrix'. |
| 2664 |
|
| 2665 |
XXX: I'd also like to direct the reader's attention to some |
| 2666 |
(not-yet-written) section on cairo's imaging model. How would I do that if |
| 2667 |
such a section existed? (cworth). |
| 2668 |
|
| 2669 |
cr |
| 2670 |
a cairo context |
| 2671 |
|
| 2672 |
source |
| 2673 |
a `<cairo-pattern-t>' to be used as the source for subsequent drawing |
| 2674 |
operations. |
| 2675 |
|
| 2676 |
This documentation was automatically generated. |
| 2677 |
|
| 2678 |
cairo-set-source-surface |
| 2679 |
- Function: cairo-set-source-surface (CR `<cairo-t>')(SURFACE |
| 2680 |
`<cairo-surface-t>')(X `<double>')(Y `<double>') |
| 2681 |
This is a convenience function for creating a pattern from SURFACE and |
| 2682 |
setting it as the source in CR with `cairo-set-source'. |
| 2683 |
|
| 2684 |
The X and Y parameters give the user-space coordinate at which the surface |
| 2685 |
origin should appear. (The surface origin is its upper-left corner before |
| 2686 |
any transformation has been applied.) The X and Y patterns are negated and |
| 2687 |
then set as translation values in the pattern matrix. |
| 2688 |
|
| 2689 |
Other than the initial translation pattern matrix, as described above, all |
| 2690 |
other pattern attributes, (such as its extend mode), are set to the default |
| 2691 |
values as in `cairo-pattern-create-for-surface'. The resulting pattern can |
| 2692 |
be queried with `cairo-get-source' so that these attributes can be modified |
| 2693 |
if desired, (eg. to create a repeating pattern with |
| 2694 |
`cairo-pattern-set-extend'). |
| 2695 |
|
| 2696 |
cr |
| 2697 |
a cairo context |
| 2698 |
|
| 2699 |
surface |
| 2700 |
a surface to be used to set the source pattern |
| 2701 |
|
| 2702 |
x |
| 2703 |
User-space X coordinate for surface origin |
| 2704 |
|
| 2705 |
y |
| 2706 |
User-space Y coordinate for surface origin |
| 2707 |
|
| 2708 |
This documentation was automatically generated. |
| 2709 |
|
| 2710 |
cairo-get-source |
| 2711 |
- Function: cairo-get-source (CR `<cairo-t>') ==>(RET `<cairo-pattern-t>') |
| 2712 |
Gets the current source pattern for CR. |
| 2713 |
|
| 2714 |
cr |
| 2715 |
a cairo context |
| 2716 |
|
| 2717 |
ret |
| 2718 |
the current source pattern. This object is owned by cairo. To keep a |
| 2719 |
reference to it, you must call `cairo-pattern-reference'. |
| 2720 |
|
| 2721 |
This documentation was automatically generated. |
| 2722 |
|
| 2723 |
cairo-set-antialias |
| 2724 |
- Function: cairo-set-antialias (CR `<cairo-t>')(ANTIALIAS |
| 2725 |
`<cairo-antialias-t>') |
| 2726 |
Set the antialiasing mode of the rasterizer used for drawing shapes. This |
| 2727 |
value is a hint, and a particular backend may or may not support a |
| 2728 |
particular value. At the current time, no backend supports |
| 2729 |
`CAIRO_ANTIALIAS_SUBPIXEL' when drawing shapes. |
| 2730 |
|
| 2731 |
Note that this option does not affect text rendering, instead see |
| 2732 |
`cairo-font-options-set-antialias'. |
| 2733 |
|
| 2734 |
cr |
| 2735 |
a `<cairo-t>' |
| 2736 |
|
| 2737 |
antialias |
| 2738 |
the new antialiasing mode |
| 2739 |
|
| 2740 |
This documentation was automatically generated. |
| 2741 |
|
| 2742 |
cairo-get-antialias |
| 2743 |
- Function: cairo-get-antialias (CR `<cairo-t>') ==>(RET `<cairo-antialias-t>') |
| 2744 |
Gets the current shape antialiasing mode, as set by |
| 2745 |
`cairo-set-shape-antialias'. |
| 2746 |
|
| 2747 |
cr |
| 2748 |
a cairo context |
| 2749 |
|
| 2750 |
ret |
| 2751 |
the current shape antialiasing mode. |
| 2752 |
|
| 2753 |
This documentation was automatically generated. |
| 2754 |
|
| 2755 |
cairo-set-dash |
| 2756 |
- Function: cairo-set-dash (CR `<cairo-t>') ==>(DASHES `<double>')(NUM-DASHES |
| 2757 |
`<int>')(OFFSET `<double>') |
| 2758 |
Sets the dash pattern to be used by `cairo-stroke'. A dash pattern is |
| 2759 |
specified by DASHES, an array of positive values. Each value provides the |
| 2760 |
length of alternate "on" and "off" portions of the stroke. The OFFSET |
| 2761 |
specifies an offset into the pattern at which the stroke begins. |
| 2762 |
|
| 2763 |
Each "on" segment will have caps applied as if the segment were a separate |
| 2764 |
sub-path. In particular, it is valid to use an "on" length of 0.0 with |
| 2765 |
CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE in order to distributed dots |
| 2766 |
or squares along a path. |
| 2767 |
|
| 2768 |
Note: The length values are in user-space units as evaluated at the time of |
| 2769 |
stroking. This is not necessarily the same as the user space at the time of |
| 2770 |
`cairo-set-dash'. |
| 2771 |
|
| 2772 |
If NUM-DASHES is 0 dashing is disabled. |
| 2773 |
|
| 2774 |
If NUM-DASHES is 1 a symmetric pattern is assumed with alternating on and |
| 2775 |
off portions of the size specified by the single value in DASHES. |
| 2776 |
|
| 2777 |
If any value in DASHES is negative, or if all values are 0, then CAIRO-T |
| 2778 |
will be put into an error state with a status of |
| 2779 |
`<cairo-status-invalid-dash>'. |
| 2780 |
|
| 2781 |
cr |
| 2782 |
a cairo context |
| 2783 |
|
| 2784 |
dashes |
| 2785 |
an array specifying alternate lengths of on and off stroke portions |
| 2786 |
|
| 2787 |
num-dashes |
| 2788 |
the length of the dashes array |
| 2789 |
|
| 2790 |
offset |
| 2791 |
an offset into the dash pattern at which the stroke should start |
| 2792 |
|
| 2793 |
This documentation was automatically generated. |
| 2794 |
|
| 2795 |
cairo-get-dash-count |
| 2796 |
- Function: cairo-get-dash-count (CR `<cairo-t>') ==>(RET `<int>') |
| 2797 |
This function returns the length of the dash array in CR (0 if dashing is |
| 2798 |
not currently in effect). |
| 2799 |
|
| 2800 |
See also `cairo-set-dash' and `cairo-get-dash'. |
| 2801 |
|
| 2802 |
cr |
| 2803 |
a `<cairo-t>' |
| 2804 |
|
| 2805 |
ret |
| 2806 |
the length of the dash array, or 0 if no dash array set. |
| 2807 |
|
| 2808 |
Since 1.4 |
| 2809 |
|
| 2810 |
This documentation was automatically generated. |
| 2811 |
|
| 2812 |
cairo-set-fill-rule |
| 2813 |
- Function: cairo-set-fill-rule (CR `<cairo-t>')(FILL-RULE |
| 2814 |
`<cairo-fill-rule-t>') |
| 2815 |
Set the current fill rule within the cairo context. The fill rule is used |
| 2816 |
to determine which regions are inside or outside a complex (potentially |
| 2817 |
self-intersecting) path. The current fill rule affects both cairo_fill and |
| 2818 |
cairo_clip. See `<cairo-fill-rule-t>' for details on the semantics of each |
| 2819 |
available fill rule. |
| 2820 |
|
| 2821 |
cr |
| 2822 |
a `<cairo-t>' |
| 2823 |
|
| 2824 |
fill-rule |
| 2825 |
a fill rule, specified as a `<cairo-fill-rule-t>' |
| 2826 |
|
| 2827 |
This documentation was automatically generated. |
| 2828 |
|
| 2829 |
cairo-get-fill-rule |
| 2830 |
- Function: cairo-get-fill-rule (CR `<cairo-t>') ==>(RET `<cairo-fill-rule-t>') |
| 2831 |
Gets the current fill rule, as set by `cairo-set-fill-rule'. |
| 2832 |
|
| 2833 |
cr |
| 2834 |
a cairo context |
| 2835 |
|
| 2836 |
ret |
| 2837 |
the current fill rule. |
| 2838 |
|
| 2839 |
This documentation was automatically generated. |
| 2840 |
|
| 2841 |
cairo-set-line-cap |
| 2842 |
- Function: cairo-set-line-cap (CR `<cairo-t>')(LINE-CAP `<cairo-line-cap-t>') |
| 2843 |
Sets the current line cap style within the cairo context. See |
| 2844 |
`<cairo-line-cap-t>' for details about how the available line cap styles |
| 2845 |
are drawn. |
| 2846 |
|
| 2847 |
As with the other stroke parameters, the current line cap style is examined |
| 2848 |
by `cairo-stroke', `cairo-stroke-extents', and `cairo-stroke-to-path', but |
| 2849 |
does not have any effect during path construction. |
| 2850 |
|
| 2851 |
cr |
| 2852 |
a cairo context |
| 2853 |
|
| 2854 |
line-cap |
| 2855 |
a line cap style |
| 2856 |
|
| 2857 |
This documentation was automatically generated. |
| 2858 |
|
| 2859 |
cairo-get-line-cap |
| 2860 |
- Function: cairo-get-line-cap (CR `<cairo-t>') ==>(RET `<cairo-line-cap-t>') |
| 2861 |
Gets the current line cap style, as set by `cairo-set-line-cap'. |
| 2862 |
|
| 2863 |
cr |
| 2864 |
a cairo context |
| 2865 |
|
| 2866 |
ret |
| 2867 |
the current line cap style. |
| 2868 |
|
| 2869 |
This documentation was automatically generated. |
| 2870 |
|
| 2871 |
cairo-set-line-join |
| 2872 |
- Function: cairo-set-line-join (CR `<cairo-t>')(LINE-JOIN |
| 2873 |
`<cairo-line-join-t>') |
| 2874 |
Sets the current line join style within the cairo context. See |
| 2875 |
`<cairo-line-join-t>' for details about how the available line join styles |
| 2876 |
are drawn. |
| 2877 |
|
| 2878 |
As with the other stroke parameters, the current line join style is |
| 2879 |
examined by `cairo-stroke', `cairo-stroke-extents', and |
| 2880 |
`cairo-stroke-to-path', but does not have any effect during path |
| 2881 |
construction. |
| 2882 |
|
| 2883 |
cr |
| 2884 |
a cairo context |
| 2885 |
|
| 2886 |
line-join |
| 2887 |
a line joint style |
| 2888 |
|
| 2889 |
This documentation was automatically generated. |
| 2890 |
|
| 2891 |
cairo-get-line-join |
| 2892 |
- Function: cairo-get-line-join (CR `<cairo-t>') ==>(RET `<cairo-line-join-t>') |
| 2893 |
Gets the current line join style, as set by `cairo-set-line-join'. |
| 2894 |
|
| 2895 |
cr |
| 2896 |
a cairo context |
| 2897 |
|
| 2898 |
ret |
| 2899 |
the current line join style. |
| 2900 |
|
| 2901 |
This documentation was automatically generated. |
| 2902 |
|
| 2903 |
cairo-set-line-width |
| 2904 |
- Function: cairo-set-line-width (CR `<cairo-t>')(WIDTH `<double>') |
| 2905 |
Sets the current line width within the cairo context. The line width value |
| 2906 |
specifies the diameter of a pen that is circular in user space, (though |
| 2907 |
device-space pen may be an ellipse in general due to scaling/shear/rotation |
| 2908 |
of the CTM). |
| 2909 |
|
| 2910 |
Note: When the description above refers to user space and CTM it refers to |
| 2911 |
the user space and CTM in effect at the time of the stroking operation, not |
| 2912 |
the user space and CTM in effect at the time of the call to |
| 2913 |
`cairo-set-line-width'. The simplest usage makes both of these spaces |
| 2914 |
identical. That is, if there is no change to the CTM between a call to |
| 2915 |
`cairo-set-line-with' and the stroking operation, then one can just pass |
| 2916 |
user-space values to `cairo-set-line-width' and ignore this note. |
| 2917 |
|
| 2918 |
As with the other stroke parameters, the current line width is examined by |
| 2919 |
`cairo-stroke', `cairo-stroke-extents', and `cairo-stroke-to-path', but |
| 2920 |
does not have any effect during path construction. |
| 2921 |
|
| 2922 |
The default line width value is 2.0. |
| 2923 |
|
| 2924 |
cr |
| 2925 |
a `<cairo-t>' |
| 2926 |
|
| 2927 |
width |
| 2928 |
a line width |
| 2929 |
|
| 2930 |
This documentation was automatically generated. |
| 2931 |
|
| 2932 |
cairo-get-line-width |
| 2933 |
- Function: cairo-get-line-width (CR `<cairo-t>') ==>(RET `<double>') |
| 2934 |
This function returns the current line width value exactly as set by |
| 2935 |
`cairo-set-line-width'. Note that the value is unchanged even if the CTM |
| 2936 |
has changed between the calls to `cairo-set-line-width' and |
| 2937 |
`cairo-get-line-width'. |
| 2938 |
|
| 2939 |
cr |
| 2940 |
a cairo context |
| 2941 |
|
| 2942 |
ret |
| 2943 |
the current line width. |
| 2944 |
|
| 2945 |
This documentation was automatically generated. |
| 2946 |
|
| 2947 |
cairo-set-miter-limit |
| 2948 |
- Function: cairo-set-miter-limit (CR `<cairo-t>')(LIMIT `<double>') |
| 2949 |
Sets the current miter limit within the cairo context. |
| 2950 |
|
| 2951 |
If the current line join style is set to `CAIRO_LINE_JOIN_MITER' (see |
| 2952 |
`cairo-set-line-join'), the miter limit is used to determine whether the |
| 2953 |
lines should be joined with a bevel instead of a miter. Cairo divides the |
| 2954 |
length of the miter by the line width. If the result is greater than the |
| 2955 |
miter limit, the style is converted to a bevel. |
| 2956 |
|
| 2957 |
As with the other stroke parameters, the current line miter limit is |
| 2958 |
examined by `cairo-stroke', `cairo-stroke-extents', and |
| 2959 |
`cairo-stroke-to-path', but does not have any effect during path |
| 2960 |
construction. |
| 2961 |
|
| 2962 |
cr |
| 2963 |
a cairo context |
| 2964 |
|
| 2965 |
limit |
| 2966 |
miter limit to set |
| 2967 |
|
| 2968 |
This documentation was automatically generated. |
| 2969 |
|
| 2970 |
cairo-get-miter-limit |
| 2971 |
- Function: cairo-get-miter-limit (CR `<cairo-t>') ==>(RET `<double>') |
| 2972 |
Gets the current miter limit, as set by `cairo-set-miter-limit'. |
| 2973 |
|
| 2974 |
cr |
| 2975 |
a cairo context |
| 2976 |
|
| 2977 |
ret |
| 2978 |
the current miter limit. |
| 2979 |
|
| 2980 |
This documentation was automatically generated. |
| 2981 |
|
| 2982 |
cairo-set-operator |
| 2983 |
- Function: cairo-set-operator (CR `<cairo-t>')(OP `<cairo-operator-t>') |
| 2984 |
Sets the compositing operator to be used for all drawing operations. See |
| 2985 |
`<cairo-operator-t>' for details on the semantics of each available |
| 2986 |
compositing operator. |
| 2987 |
|
| 2988 |
XXX: I'd also like to direct the reader's attention to some |
| 2989 |
(not-yet-written) section on cairo's imaging model. How would I do that if |
| 2990 |
such a section existed? (cworth). |
| 2991 |
|
| 2992 |
cr |
| 2993 |
a `<cairo-t>' |
| 2994 |
|
| 2995 |
op |
| 2996 |
a compositing operator, specified as a `<cairo-operator-t>' |
| 2997 |
|
| 2998 |
This documentation was automatically generated. |
| 2999 |
|
| 3000 |
cairo-get-operator |
| 3001 |
- Function: cairo-get-operator (CR `<cairo-t>') ==>(RET `<cairo-operator-t>') |
| 3002 |
Gets the current compositing operator for a cairo context. |
| 3003 |
|
| 3004 |
cr |
| 3005 |
a cairo context |
| 3006 |
|
| 3007 |
ret |
| 3008 |
the current compositing operator. |
| 3009 |
|
| 3010 |
This documentation was automatically generated. |
| 3011 |
|
| 3012 |
cairo-set-tolerance |
| 3013 |
- Function: cairo-set-tolerance (CR `<cairo-t>')(TOLERANCE `<double>') |
| 3014 |
Sets the tolerance used when converting paths into trapezoids. Curved |
| 3015 |
segments of the path will be subdivided until the maximum deviation between |
| 3016 |
the original path and the polygonal approximation is less than TOLERANCE. |
| 3017 |
The default value is 0.1. A larger value will give better performance, a |
| 3018 |
smaller value, better appearance. (Reducing the value from the default |
| 3019 |
value of 0.1 is unlikely to improve appearance significantly.) |
| 3020 |
|
| 3021 |
cr |
| 3022 |
a `<cairo-t>' |
| 3023 |
|
| 3024 |
tolerance |
| 3025 |
the tolerance, in device units (typically pixels) |
| 3026 |
|
| 3027 |
This documentation was automatically generated. |
| 3028 |
|
| 3029 |
cairo-get-tolerance |
| 3030 |
- Function: cairo-get-tolerance (CR `<cairo-t>') ==>(RET `<double>') |
| 3031 |
Gets the current tolerance value, as set by `cairo-set-tolerance'. |
| 3032 |
|
| 3033 |
cr |
| 3034 |
a cairo context |
| 3035 |
|
| 3036 |
ret |
| 3037 |
the current tolerance value. |
| 3038 |
|
| 3039 |
This documentation was automatically generated. |
| 3040 |
|
| 3041 |
cairo-clip |
| 3042 |
- Function: cairo-clip (CR `<cairo-t>') |
| 3043 |
Establishes a new clip region by intersecting the current clip region with |
| 3044 |
the current path as it would be filled by `cairo-fill' and according to the |
| 3045 |
current fill rule (see `cairo-set-fill-rule'). |
| 3046 |
|
| 3047 |
After cairo_clip, the current path will be cleared from the cairo context. |
| 3048 |
|
| 3049 |
The current clip region affects all drawing operations by effectively |
| 3050 |
masking out any changes to the surface that are outside the current clip |
| 3051 |
region. |
| 3052 |
|
| 3053 |
Calling `cairo-clip' can only make the clip region smaller, never larger. |
| 3054 |
But the current clip is part of the graphics state, so a temporary |
| 3055 |
restriction of the clip region can be achieved by calling `cairo-clip' |
| 3056 |
within a `cairo-save'/`cairo-restore' pair. The only other means of |
| 3057 |
increasing the size of the clip region is `cairo-reset-clip'. |
| 3058 |
|
| 3059 |
cr |
| 3060 |
a cairo context |
| 3061 |
|
| 3062 |
This documentation was automatically generated. |
| 3063 |
|
| 3064 |
cairo-clip-preserve |
| 3065 |
- Function: cairo-clip-preserve (CR `<cairo-t>') |
| 3066 |
Establishes a new clip region by intersecting the current clip region with |
| 3067 |
the current path as it would be filled by `cairo-fill' and according to the |
| 3068 |
current fill rule (see `cairo-set-fill-rule'). |
| 3069 |
|
| 3070 |
Unlike `cairo-clip', cairo_clip_preserve preserves the path within the |
| 3071 |
cairo context. |
| 3072 |
|
| 3073 |
The current clip region affects all drawing operations by effectively |
| 3074 |
masking out any changes to the surface that are outside the current clip |
| 3075 |
region. |
| 3076 |
|
| 3077 |
Calling `cairo-clip' can only make the clip region smaller, never larger. |
| 3078 |
But the current clip is part of the graphics state, so a temporary |
| 3079 |
restriction of the clip region can be achieved by calling `cairo-clip' |
| 3080 |
within a `cairo-save'/`cairo-restore' pair. The only other means of |
| 3081 |
increasing the size of the clip region is `cairo-reset-clip'. |
| 3082 |
|
| 3083 |
cr |
| 3084 |
a cairo context |
| 3085 |
|
| 3086 |
This documentation was automatically generated. |
| 3087 |
|
| 3088 |
cairo-clip-extents |
| 3089 |
- Function: cairo-clip-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1 |
| 3090 |
`<double>')(X2 `<double>')(Y2 `<double>') |
| 3091 |
Computes a bounding box in user coordinates covering the area inside the |
| 3092 |
current clip. |
| 3093 |
|
| 3094 |
cr |
| 3095 |
a cairo context |
| 3096 |
|
| 3097 |
x1 |
| 3098 |
left of the resulting extents |
| 3099 |
|
| 3100 |
y1 |
| 3101 |
top of the resulting extents |
| 3102 |
|
| 3103 |
x2 |
| 3104 |
right of the resulting extents |
| 3105 |
|
| 3106 |
y2 |
| 3107 |
bottom of the resulting extents |
| 3108 |
|
| 3109 |
Since 1.4 |
| 3110 |
|
| 3111 |
This documentation was automatically generated. |
| 3112 |
|
| 3113 |
cairo-reset-clip |
| 3114 |
- Function: cairo-reset-clip (CR `<cairo-t>') |
| 3115 |
Reset the current clip region to its original, unrestricted state. That is, |
| 3116 |
set the clip region to an infinitely large shape containing the target |
| 3117 |
surface. Equivalently, if infinity is too hard to grasp, one can imagine |
| 3118 |
the clip region being reset to the exact bounds of the target surface. |
| 3119 |
|
| 3120 |
Note that code meant to be reusable should not call `cairo-reset-clip' as |
| 3121 |
it will cause results unexpected by higher-level code which calls |
| 3122 |
`cairo-clip'. Consider using `cairo-save' and `cairo-restore' around |
| 3123 |
`cairo-clip' as a more robust means of temporarily restricting the clip |
| 3124 |
region. |
| 3125 |
|
| 3126 |
cr |
| 3127 |
a cairo context |
| 3128 |
|
| 3129 |
This documentation was automatically generated. |
| 3130 |
|
| 3131 |
cairo-copy-clip-rectangle-list |
| 3132 |
- Function: cairo-copy-clip-rectangle-list (CR `<cairo-t>') ==>(RET |
| 3133 |
`<cairo-rectangle-list-t>') |
| 3134 |
Gets the current clip region as a list of rectangles in user coordinates. |
| 3135 |
Never returns ``#f''. |
| 3136 |
|
| 3137 |
The status in the list may be CAIRO_STATUS_CLIP_NOT_REPRESENTABLE to |
| 3138 |
indicate that the clip region cannot be represented as a list of user-space |
| 3139 |
rectangles. The status may have other values to indicate other errors. |
| 3140 |
|
| 3141 |
The caller must always call cairo_rectangle_list_destroy on the result of |
| 3142 |
this function. |
| 3143 |
|
| 3144 |
cr |
| 3145 |
a cairo context |
| 3146 |
|
| 3147 |
ret |
| 3148 |
the current clip region as a list of rectangles in user coordinates. |
| 3149 |
|
| 3150 |
Since 1.4 |
| 3151 |
|
| 3152 |
This documentation was automatically generated. |
| 3153 |
|
| 3154 |
cairo-fill |
| 3155 |
- Function: cairo-fill (CR `<cairo-t>') |
| 3156 |
A drawing operator that fills the current path according to the current |
| 3157 |
fill rule, (each sub-path is implicitly closed before being filled). After |
| 3158 |
cairo_fill, the current path will be cleared from the cairo context. See |
| 3159 |
`cairo-set-fill-rule' and `cairo-fill-preserve'. |
| 3160 |
|
| 3161 |
cr |
| 3162 |
a cairo context |
| 3163 |
|
| 3164 |
This documentation was automatically generated. |
| 3165 |
|
| 3166 |
cairo-fill-preserve |
| 3167 |
- Function: cairo-fill-preserve (CR `<cairo-t>') |
| 3168 |
A drawing operator that fills the current path according to the current |
| 3169 |
fill rule, (each sub-path is implicitly closed before being filled). Unlike |
| 3170 |
`cairo-fill', cairo_fill_preserve preserves the path within the cairo |
| 3171 |
context. |
| 3172 |
|
| 3173 |
See `cairo-set-fill-rule' and `cairo-fill'. |
| 3174 |
|
| 3175 |
cr |
| 3176 |
a cairo context |
| 3177 |
|
| 3178 |
This documentation was automatically generated. |
| 3179 |
|
| 3180 |
cairo-fill-extents |
| 3181 |
- Function: cairo-fill-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1 |
| 3182 |
`<double>')(X2 `<double>')(Y2 `<double>') |
| 3183 |
Computes a bounding box in user coordinates covering the area that would be |
| 3184 |
affected by a `cairo-fill' operation given the current path and fill |
| 3185 |
parameters. If the current path is empty, returns an empty rectangle (0,0, |
| 3186 |
0,0). Surface dimensions and clipping are not taken into account. |
| 3187 |
|
| 3188 |
See `cairo-fill', `cairo-set-fill-rule' and `cairo-fill-preserve'. |
| 3189 |
|
| 3190 |
cr |
| 3191 |
a cairo context |
| 3192 |
|
| 3193 |
x1 |
| 3194 |
left of the resulting extents |
| 3195 |
|
| 3196 |
y1 |
| 3197 |
top of the resulting extents |
| 3198 |
|
| 3199 |
x2 |
| 3200 |
right of the resulting extents |
| 3201 |
|
| 3202 |
y2 |
| 3203 |
bottom of the resulting extents |
| 3204 |
|
| 3205 |
This documentation was automatically generated. |
| 3206 |
|
| 3207 |
cairo-in-fill |
| 3208 |
- Function: cairo-in-fill (CR `<cairo-t>')(X `<double>')(Y `<double>') ==>(RET |
| 3209 |
`<cairo-bool-t>') |
| 3210 |
Tests whether the given point is inside the area that would be affected by |
| 3211 |
a `cairo-fill' operation given the current path and filling parameters. |
| 3212 |
Surface dimensions and clipping are not taken into account. |
| 3213 |
|
| 3214 |
See `cairo-fill', `cairo-set-fill-rule' and `cairo-fill-preserve'. |
| 3215 |
|
| 3216 |
cr |
| 3217 |
a cairo context |
| 3218 |
|
| 3219 |
x |
| 3220 |
X coordinate of the point to test |
| 3221 |
|
| 3222 |
y |
| 3223 |
Y coordinate of the point to test |
| 3224 |
|
| 3225 |
ret |
| 3226 |
A non-zero value if the point is inside, or zero if outside. |
| 3227 |
|
| 3228 |
This documentation was automatically generated. |
| 3229 |
|
| 3230 |
cairo-mask |
| 3231 |
- Function: cairo-mask (CR `<cairo-t>')(PATTERN `<cairo-pattern-t>') |
| 3232 |
A drawing operator that paints the current source using the alpha channel |
| 3233 |
of PATTERN as a mask. (Opaque areas of PATTERN are painted with the source, |
| 3234 |
transparent areas are not painted.) |
| 3235 |
|
| 3236 |
cr |
| 3237 |
a cairo context |
| 3238 |
|
| 3239 |
pattern |
| 3240 |
a `<cairo-pattern-t>' |
| 3241 |
|
| 3242 |
This documentation was automatically generated. |
| 3243 |
|
| 3244 |
cairo-mask-surface |
| 3245 |
- Function: cairo-mask-surface (CR `<cairo-t>')(SURFACE |
| 3246 |
`<cairo-surface-t>')(SURFACE-X `<double>')(SURFACE-Y `<double>') |
| 3247 |
A drawing operator that paints the current source using the alpha channel |
| 3248 |
of SURFACE as a mask. (Opaque areas of SURFACE are painted with the source, |
| 3249 |
transparent areas are not painted.) |
| 3250 |
|
| 3251 |
cr |
| 3252 |
a cairo context |
| 3253 |
|
| 3254 |
surface |
| 3255 |
a `<cairo-surface-t>' |
| 3256 |
|
| 3257 |
surface-x |
| 3258 |
X coordinate at which to place the origin of SURFACE |
| 3259 |
|
| 3260 |
surface-y |
| 3261 |
Y coordinate at which to place the origin of SURFACE |
| 3262 |
|
| 3263 |
This documentation was automatically generated. |
| 3264 |
|
| 3265 |
cairo-paint |
| 3266 |
- Function: cairo-paint (CR `<cairo-t>') |
| 3267 |
A drawing operator that paints the current source everywhere within the |
| 3268 |
current clip region. |
| 3269 |
|
| 3270 |
cr |
| 3271 |
a cairo context |
| 3272 |
|
| 3273 |
This documentation was automatically generated. |
| 3274 |
|
| 3275 |
cairo-paint-with-alpha |
| 3276 |
- Function: cairo-paint-with-alpha (CR `<cairo-t>')(ALPHA `<double>') |
| 3277 |
A drawing operator that paints the current source everywhere within the |
| 3278 |
current clip region using a mask of constant alpha value ALPHA. The effect |
| 3279 |
is similar to `cairo-paint', but the drawing is faded out using the alpha |
| 3280 |
value. |
| 3281 |
|
| 3282 |
cr |
| 3283 |
a cairo context |
| 3284 |
|
| 3285 |
alpha |
| 3286 |
alpha value, between 0 (transparent) and 1 (opaque) |
| 3287 |
|
| 3288 |
This documentation was automatically generated. |
| 3289 |
|
| 3290 |
cairo-stroke |
| 3291 |
- Function: cairo-stroke (CR `<cairo-t>') |
| 3292 |
A drawing operator that strokes the current path according to the current |
| 3293 |
line width, line join, line cap, and dash settings. After cairo_stroke, the |
| 3294 |
current path will be cleared from the cairo context. See |
| 3295 |
`cairo-set-line-width', `cairo-set-line-join', `cairo-set-line-cap', |
| 3296 |
`cairo-set-dash', and `cairo-stroke-preserve'. |
| 3297 |
|
| 3298 |
Note: Degenerate segments and sub-paths are treated specially and provide a |
| 3299 |
useful result. These can result in two different situations: |
| 3300 |
|
| 3301 |
1. Zero-length "on" segments set in `cairo-set-dash'. If the cap style is |
| 3302 |
CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE then these segments will be |
| 3303 |
drawn as circular dots or squares respectively. In the case of |
| 3304 |
CAIRO_LINE_CAP_SQUARE, the orientation of the squares is determined by the |
| 3305 |
direction of the underlying path. |
| 3306 |
|
| 3307 |
2. A sub-path created by `cairo-move-to' followed by either a |
| 3308 |
`cairo-close-path' or one or more calls to `cairo-line-to' to the same |
| 3309 |
coordinate as the `cairo-move-to'. If the cap style is CAIRO_LINE_CAP_ROUND |
| 3310 |
then these sub-paths will be drawn as circular dots. Note that in the case |
| 3311 |
of CAIRO_LINE_CAP_SQUARE a degenerate sub-path will not be drawn at all, |
| 3312 |
(since the correct orientation is indeterminate). |
| 3313 |
|
| 3314 |
In no case will a cap style of CAIRO_LINE_CAP_BUTT cause anything to be |
| 3315 |
drawn in the case of either degenerate segments or sub-paths. |
| 3316 |
|
| 3317 |
cr |
| 3318 |
a cairo context |
| 3319 |
|
| 3320 |
This documentation was automatically generated. |
| 3321 |
|
| 3322 |
cairo-stroke-preserve |
| 3323 |
- Function: cairo-stroke-preserve (CR `<cairo-t>') |
| 3324 |
A drawing operator that strokes the current path according to the current |
| 3325 |
line width, line join, line cap, and dash settings. Unlike `cairo-stroke', |
| 3326 |
cairo_stroke_preserve preserves the path within the cairo context. |
| 3327 |
|
| 3328 |
See `cairo-set-line-width', `cairo-set-line-join', `cairo-set-line-cap', |
| 3329 |
`cairo-set-dash', and `cairo-stroke-preserve'. |
| 3330 |
|
| 3331 |
cr |
| 3332 |
a cairo context |
| 3333 |
|
| 3334 |
This documentation was automatically generated. |
| 3335 |
|
| 3336 |
cairo-stroke-extents |
| 3337 |
- Function: cairo-stroke-extents (CR `<cairo-t>') ==>(X1 `<double>')(Y1 |
| 3338 |
`<double>')(X2 `<double>')(Y2 `<double>') |
| 3339 |
Computes a bounding box in user coordinates covering the area that would be |
| 3340 |
affected by a `cairo-stroke' operation operation given the current path and |
| 3341 |
stroke parameters. If the current path is empty, |
| 3342 |
|
| 3343 |
cr |
| 3344 |
a cairo context |
| 3345 |
|
| 3346 |
x1 |
| 3347 |
left of the resulting extents |
| 3348 |
|
| 3349 |
y1 |
| 3350 |
top of the resulting extents |
| 3351 |
|
| 3352 |
x2 |
| 3353 |
right of the resulting extents |
| 3354 |
|
| 3355 |
y2 |
| 3356 |
bottom of the resulting extents |
| 3357 |
|
| 3358 |
This documentation was automatically generated. |
| 3359 |
|
| 3360 |
cairo-in-stroke |
| 3361 |
- Function: cairo-in-stroke (CR `<cairo-t>')(X `<double>')(Y `<double>') ==>(RET |
| 3362 |
`<cairo-bool-t>') |
| 3363 |
Tests whether the given point is inside the area that would be affected by |
| 3364 |
a `cairo-stroke' operation given the current path and stroking parameters. |
| 3365 |
Surface dimensions and clipping are not taken into account. |
| 3366 |
|
| 3367 |
See `cairo-stroke', `cairo-set-line-width', `cairo-set-line-join', |
| 3368 |
`cairo-set-line-cap', `cairo-set-dash', and `cairo-stroke-preserve'. |
| 3369 |
|
| 3370 |
cr |
| 3371 |
a cairo context |
| 3372 |
|
| 3373 |
x |
| 3374 |
X coordinate of the point to test |
| 3375 |
|
| 3376 |
y |
| 3377 |
Y coordinate of the point to test |
| 3378 |
|
| 3379 |
ret |
| 3380 |
A non-zero value if the point is inside, or zero if outside. |
| 3381 |
|
| 3382 |
This documentation was automatically generated. |
| 3383 |
|
| 3384 |
cairo-copy-page |
| 3385 |
- Function: cairo-copy-page (CR `<cairo-t>') |
| 3386 |
Emits the current page for backends that support multiple pages, but |
| 3387 |
doesn't clear it, so, the contents of the current page will be retained for |
| 3388 |
the next page too. Use `cairo-show-page' if you want to get an empty page |
| 3389 |
after the emission. |
| 3390 |
|
| 3391 |
cr |
| 3392 |
a cairo context |
| 3393 |
|
| 3394 |
This documentation was automatically generated. |
| 3395 |
|
| 3396 |
cairo-show-page |
| 3397 |
- Function: cairo-show-page (CR `<cairo-t>') |
| 3398 |
Emits and clears the current page for backends that support multiple pages. |
| 3399 |
Use `cairo-copy-page' if you don't want to clear the page. |
| 3400 |
|
| 3401 |
cr |
| 3402 |
a cairo context |
| 3403 |
|
| 3404 |
This documentation was automatically generated. |
| 3405 |
|