Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
cairo.h
Go to the documentation of this file.
1/* cairo - a vector graphics library with display and print output
2 *
3 * Copyright © 2002 University of Southern California
4 * Copyright © 2005 Red Hat, Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it either under the terms of the GNU Lesser General Public
8 * License version 2.1 as published by the Free Software Foundation
9 * (the "LGPL") or, at your option, under the terms of the Mozilla
10 * Public License Version 1.1 (the "MPL"). If you do not alter this
11 * notice, a recipient may use your version of this file under either
12 * the MPL or the LGPL.
13 *
14 * You should have received a copy of the LGPL along with this library
15 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
17 * You should have received a copy of the MPL along with this library
18 * in the file COPYING-MPL-1.1
19 *
20 * The contents of this file are subject to the Mozilla Public License
21 * Version 1.1 (the "License"); you may not use this file except in
22 * compliance with the License. You may obtain a copy of the License at
23 * http://www.mozilla.org/MPL/
24 *
25 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27 * the specific language governing rights and limitations.
28 *
29 * The Original Code is the cairo graphics library.
30 *
31 * The Initial Developer of the Original Code is University of Southern
32 * California.
33 *
34 * Contributor(s):
35 * Carl D. Worth <cworth@cworth.org>
36 */
37
38#ifndef CAIRO_H
39#define CAIRO_H
40
41#include "cairo-version.h"
42#include "cairo-features.h"
43#include "cairo-deprecated.h"
44
45#ifdef __cplusplus
46# define CAIRO_BEGIN_DECLS extern "C" {
47# define CAIRO_END_DECLS }
48#else
49# define CAIRO_BEGIN_DECLS
50# define CAIRO_END_DECLS
51#endif
52
53#if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(CAIRO_WIN32_STATIC_BUILD)
54# define _cairo_export __declspec(dllexport)
55# define _cairo_import __declspec(dllimport)
56#elif defined(__GNUC__) && (__GNUC__ >= 4)
57# define _cairo_export __attribute__((__visibility__("default")))
58# define _cairo_import
59#else
60# define _cairo_export
61# define _cairo_import
62#endif
63
64#ifdef CAIRO_COMPILATION
65# define _cairo_api _cairo_export
66#else
67# define _cairo_api _cairo_import
68#endif
69
70#define cairo_public _cairo_api extern
71
73
74#define CAIRO_VERSION_ENCODE(major, minor, micro) ( \
75 ((major) * 10000) \
76 + ((minor) * 100) \
77 + ((micro) * 1))
78
79#define CAIRO_VERSION CAIRO_VERSION_ENCODE( \
80 CAIRO_VERSION_MAJOR, \
81 CAIRO_VERSION_MINOR, \
82 CAIRO_VERSION_MICRO)
83
84
85#define CAIRO_VERSION_STRINGIZE_(major, minor, micro) \
86 #major"."#minor"."#micro
87#define CAIRO_VERSION_STRINGIZE(major, minor, micro) \
88 CAIRO_VERSION_STRINGIZE_(major, minor, micro)
89
90#define CAIRO_VERSION_STRING CAIRO_VERSION_STRINGIZE( \
91 CAIRO_VERSION_MAJOR, \
92 CAIRO_VERSION_MINOR, \
93 CAIRO_VERSION_MICRO)
94
95
98
99cairo_public const char*
101
102/**
103 * cairo_bool_t:
104 *
105 * #cairo_bool_t is used for boolean values. Returns of type
106 * #cairo_bool_t will always be either 0 or 1, but testing against
107 * these values explicitly is not encouraged; just use the
108 * value as a boolean condition.
109 *
110 * <informalexample><programlisting>
111 * if (cairo_in_stroke (cr, x, y)) {
112 * /<!-- -->* do something *<!-- -->/
113 * }
114 * </programlisting></informalexample>
115 *
116 * Since: 1.0
117 **/
118typedef int cairo_bool_t;
119
120/**
121 * cairo_t:
122 *
123 * A #cairo_t contains the current state of the rendering device,
124 * including coordinates of yet to be drawn shapes.
125 *
126 * Cairo contexts, as #cairo_t objects are named, are central to
127 * cairo and all drawing with cairo is always done to a #cairo_t
128 * object.
129 *
130 * Memory management of #cairo_t is done with
131 * cairo_reference() and cairo_destroy().
132 *
133 * Since: 1.0
134 **/
135typedef struct _cairo cairo_t;
136
137/**
138 * cairo_surface_t:
139 *
140 * A #cairo_surface_t represents an image, either as the destination
141 * of a drawing operation or as source when drawing onto another
142 * surface. To draw to a #cairo_surface_t, create a cairo context
143 * with the surface as the target, using cairo_create().
144 *
145 * There are different subtypes of #cairo_surface_t for
146 * different drawing backends; for example, cairo_image_surface_create()
147 * creates a bitmap image in memory.
148 * The type of a surface can be queried with cairo_surface_get_type().
149 *
150 * The initial contents of a surface after creation depend upon the manner
151 * of its creation. If cairo creates the surface and backing storage for
152 * the user, it will be initially cleared; for example,
153 * cairo_image_surface_create() and cairo_surface_create_similar().
154 * Alternatively, if the user passes in a reference to some backing storage
155 * and asks cairo to wrap that in a #cairo_surface_t, then the contents are
156 * not modified; for example, cairo_image_surface_create_for_data() and
157 * cairo_xlib_surface_create().
158 *
159 * Memory management of #cairo_surface_t is done with
160 * cairo_surface_reference() and cairo_surface_destroy().
161 *
162 * Since: 1.0
163 **/
164typedef struct _cairo_surface cairo_surface_t;
165
166/**
167 * cairo_device_t:
168 *
169 * A #cairo_device_t represents the driver interface for drawing
170 * operations to a #cairo_surface_t. There are different subtypes of
171 * #cairo_device_t for different drawing backends.
172 *
173 * The type of a device can be queried with cairo_device_get_type().
174 *
175 * Memory management of #cairo_device_t is done with
176 * cairo_device_reference() and cairo_device_destroy().
177 *
178 * Since: 1.10
179 **/
180typedef struct _cairo_device cairo_device_t;
181
182/**
183 * cairo_matrix_t:
184 * @xx: xx component of the affine transformation
185 * @yx: yx component of the affine transformation
186 * @xy: xy component of the affine transformation
187 * @yy: yy component of the affine transformation
188 * @x0: X translation component of the affine transformation
189 * @y0: Y translation component of the affine transformation
190 *
191 * A #cairo_matrix_t holds an affine transformation, such as a scale,
192 * rotation, shear, or a combination of those. The transformation of
193 * a point (x, y) is given by:
194 * <programlisting>
195 * x_new = xx * x + xy * y + x0;
196 * y_new = yx * x + yy * y + y0;
197 * </programlisting>
198 *
199 * Since: 1.0
200 **/
201typedef struct _cairo_matrix {
202 double xx; double yx;
203 double xy; double yy;
204 double x0; double y0;
206
207/**
208 * cairo_pattern_t:
209 *
210 * A #cairo_pattern_t represents a source when drawing onto a
211 * surface. There are different subtypes of #cairo_pattern_t,
212 * for different types of sources; for example,
213 * cairo_pattern_create_rgb() creates a pattern for a solid
214 * opaque color.
215 *
216 * Other than various
217 * <function>cairo_pattern_create_<emphasis>type</emphasis>()</function>
218 * functions, some of the pattern types can be implicitly created using various
219 * <function>cairo_set_source_<emphasis>type</emphasis>()</function> functions;
220 * for example cairo_set_source_rgb().
221 *
222 * The type of a pattern can be queried with cairo_pattern_get_type().
223 *
224 * Memory management of #cairo_pattern_t is done with
225 * cairo_pattern_reference() and cairo_pattern_destroy().
226 *
227 * Since: 1.0
228 **/
229typedef struct _cairo_pattern cairo_pattern_t;
230
231/**
232 * cairo_destroy_func_t:
233 * @data: The data element being destroyed.
234 *
235 * #cairo_destroy_func_t the type of function which is called when a
236 * data element is destroyed. It is passed the pointer to the data
237 * element and should free any memory and resources allocated for it.
238 *
239 * Since: 1.0
240 **/
241typedef void (*cairo_destroy_func_t) (void *data);
242
243/**
244 * cairo_user_data_key_t:
245 * @unused: not used; ignore.
246 *
247 * #cairo_user_data_key_t is used for attaching user data to cairo
248 * data structures. The actual contents of the struct is never used,
249 * and there is no need to initialize the object; only the unique
250 * address of a #cairo_data_key_t object is used. Typically, you
251 * would just use the address of a static #cairo_data_key_t object.
252 *
253 * Since: 1.0
254 **/
258
259/**
260 * cairo_status_t:
261 * @CAIRO_STATUS_SUCCESS: no error has occurred (Since 1.0)
262 * @CAIRO_STATUS_NO_MEMORY: out of memory (Since 1.0)
263 * @CAIRO_STATUS_INVALID_RESTORE: cairo_restore() called without matching cairo_save() (Since 1.0)
264 * @CAIRO_STATUS_INVALID_POP_GROUP: no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)
265 * @CAIRO_STATUS_NO_CURRENT_POINT: no current point defined (Since 1.0)
266 * @CAIRO_STATUS_INVALID_MATRIX: invalid matrix (not invertible) (Since 1.0)
267 * @CAIRO_STATUS_INVALID_STATUS: invalid value for an input #cairo_status_t (Since 1.0)
268 * @CAIRO_STATUS_NULL_POINTER: %NULL pointer (Since 1.0)
269 * @CAIRO_STATUS_INVALID_STRING: input string not valid UTF-8 (Since 1.0)
270 * @CAIRO_STATUS_INVALID_PATH_DATA: input path data not valid (Since 1.0)
271 * @CAIRO_STATUS_READ_ERROR: error while reading from input stream (Since 1.0)
272 * @CAIRO_STATUS_WRITE_ERROR: error while writing to output stream (Since 1.0)
273 * @CAIRO_STATUS_SURFACE_FINISHED: target surface has been finished (Since 1.0)
274 * @CAIRO_STATUS_SURFACE_TYPE_MISMATCH: the surface type is not appropriate for the operation (Since 1.0)
275 * @CAIRO_STATUS_PATTERN_TYPE_MISMATCH: the pattern type is not appropriate for the operation (Since 1.0)
276 * @CAIRO_STATUS_INVALID_CONTENT: invalid value for an input #cairo_content_t (Since 1.0)
277 * @CAIRO_STATUS_INVALID_FORMAT: invalid value for an input #cairo_format_t (Since 1.0)
278 * @CAIRO_STATUS_INVALID_VISUAL: invalid value for an input Visual* (Since 1.0)
279 * @CAIRO_STATUS_FILE_NOT_FOUND: file not found (Since 1.0)
280 * @CAIRO_STATUS_INVALID_DASH: invalid value for a dash setting (Since 1.0)
281 * @CAIRO_STATUS_INVALID_DSC_COMMENT: invalid value for a DSC comment (Since 1.2)
282 * @CAIRO_STATUS_INVALID_INDEX: invalid index passed to getter (Since 1.4)
283 * @CAIRO_STATUS_CLIP_NOT_REPRESENTABLE: clip region not representable in desired format (Since 1.4)
284 * @CAIRO_STATUS_TEMP_FILE_ERROR: error creating or writing to a temporary file (Since 1.6)
285 * @CAIRO_STATUS_INVALID_STRIDE: invalid value for stride (Since 1.6)
286 * @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8)
287 * @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8)
288 * @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8)
289 * @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8)
290 * @CAIRO_STATUS_INVALID_CLUSTERS: input clusters do not represent the accompanying text and glyph array (Since 1.8)
291 * @CAIRO_STATUS_INVALID_SLANT: invalid value for an input #cairo_font_slant_t (Since 1.8)
292 * @CAIRO_STATUS_INVALID_WEIGHT: invalid value for an input #cairo_font_weight_t (Since 1.8)
293 * @CAIRO_STATUS_INVALID_SIZE: invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
294 * @CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: user-font method not implemented (Since 1.10)
295 * @CAIRO_STATUS_DEVICE_TYPE_MISMATCH: the device type is not appropriate for the operation (Since 1.10)
296 * @CAIRO_STATUS_DEVICE_ERROR: an operation to the device caused an unspecified error (Since 1.10)
297 * @CAIRO_STATUS_INVALID_MESH_CONSTRUCTION: a mesh pattern
298 * construction operation was used outside of a
299 * cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch()
300 * pair (Since 1.12)
301 * @CAIRO_STATUS_DEVICE_FINISHED: target device has been finished (Since 1.12)
302 * @CAIRO_STATUS_JBIG2_GLOBAL_MISSING: %CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image
303 * but no image provided %CAIRO_MIME_TYPE_JBIG2_GLOBAL (Since 1.14)
304 * @CAIRO_STATUS_PNG_ERROR: error occurred in libpng while reading from or writing to a PNG file (Since 1.16)
305 * @CAIRO_STATUS_FREETYPE_ERROR: error occurred in libfreetype (Since 1.16)
306 * @CAIRO_STATUS_WIN32_GDI_ERROR: error occurred in the Windows Graphics Device Interface (Since 1.16)
307 * @CAIRO_STATUS_TAG_ERROR: invalid tag name, attributes, or nesting (Since 1.16)
308 * @CAIRO_STATUS_DWRITE_ERROR: error occurred in the Windows Direct Write API (Since 1.18)
309 * @CAIRO_STATUS_SVG_FONT_ERROR: error occurred in OpenType-SVG font rendering (Since 1.18)
310 * @CAIRO_STATUS_LAST_STATUS: this is a special value indicating the number of
311 * status values defined in this enumeration. When using this value, note
312 * that the version of cairo at run-time may have additional status values
313 * defined than the value of this symbol at compile-time. (Since 1.10)
314 *
315 * #cairo_status_t is used to indicate errors that can occur when
316 * using Cairo. In some cases it is returned directly by functions.
317 * but when using #cairo_t, the last error, if any, is stored in
318 * the context and can be retrieved with cairo_status().
319 *
320 * New entries may be added in future versions. Use cairo_status_to_string()
321 * to get a human-readable representation of an error message.
322 *
323 * Since: 1.0
324 **/
325typedef enum _cairo_status {
327
372
375
376/**
377 * cairo_content_t:
378 * @CAIRO_CONTENT_COLOR: The surface will hold color content only. (Since 1.0)
379 * @CAIRO_CONTENT_ALPHA: The surface will hold alpha content only. (Since 1.0)
380 * @CAIRO_CONTENT_COLOR_ALPHA: The surface will hold color and alpha content. (Since 1.0)
381 *
382 * #cairo_content_t is used to describe the content that a surface will
383 * contain, whether color information, alpha information (translucence
384 * vs. opacity), or both.
385 *
386 * Note: The large values here are designed to keep #cairo_content_t
387 * values distinct from #cairo_format_t values so that the
388 * implementation can detect the error if users confuse the two types.
389 *
390 * Since: 1.0
391 **/
397
398/**
399 * cairo_format_t:
400 * @CAIRO_FORMAT_INVALID: no such format exists or is supported.
401 * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
402 * alpha in the upper 8 bits, then red, then green, then blue.
403 * The 32-bit quantities are stored native-endian. Pre-multiplied
404 * alpha is used. (That is, 50% transparent red is 0x80800000,
405 * not 0x80ff0000.) (Since 1.0)
406 * @CAIRO_FORMAT_RGB24: each pixel is a 32-bit quantity, with
407 * the upper 8 bits unused. Red, Green, and Blue are stored
408 * in the remaining 24 bits in that order. (Since 1.0)
409 * @CAIRO_FORMAT_A8: each pixel is a 8-bit quantity holding
410 * an alpha value. (Since 1.0)
411 * @CAIRO_FORMAT_A1: each pixel is a 1-bit quantity holding
412 * an alpha value. Pixels are packed together into 32-bit
413 * quantities. The ordering of the bits matches the
414 * endianness of the platform. On a big-endian machine, the
415 * first pixel is in the uppermost bit, on a little-endian
416 * machine the first pixel is in the least-significant bit. (Since 1.0)
417 * @CAIRO_FORMAT_RGB16_565: each pixel is a 16-bit quantity
418 * with red in the upper 5 bits, then green in the middle
419 * 6 bits, and blue in the lower 5 bits. (Since 1.2)
420 * @CAIRO_FORMAT_RGB30: like RGB24 but with 10bpc. (Since 1.12)
421 * @CAIRO_FORMAT_RGB96F: 3 floats, R, G, B. (Since 1.17.2)
422 * @CAIRO_FORMAT_RGBA128F: 4 floats, R, G, B, A. (Since 1.17.2)
423 *
424 * #cairo_format_t is used to identify the memory format of
425 * image data.
426 *
427 * New entries may be added in future versions.
428 *
429 * Since: 1.0
430 **/
442
443/**
444 * cairo_dither_t:
445 * @CAIRO_DITHER_NONE: No dithering.
446 * @CAIRO_DITHER_DEFAULT: Default choice at cairo compile time. Currently NONE.
447 * @CAIRO_DITHER_FAST: Fastest dithering algorithm supported by the backend
448 * @CAIRO_DITHER_GOOD: An algorithm with smoother dithering than FAST
449 * @CAIRO_DITHER_BEST: Best algorithm available in the backend
450 *
451 * Dither is an intentionally applied form of noise used to randomize
452 * quantization error, preventing large-scale patterns such as color banding
453 * in images (e.g. for gradients). Ordered dithering applies a precomputed
454 * threshold matrix to spread the errors smoothly.
455 *
456 * #cairo_dither_t is modeled on pixman dithering algorithm choice.
457 * As of Pixman 0.40, FAST corresponds to a 8x8 ordered bayer noise and GOOD
458 * and BEST use an ordered 64x64 precomputed blue noise.
459 *
460 * Since: 1.18
461 **/
469
470cairo_public void
472
475
476/**
477 * cairo_write_func_t:
478 * @closure: the output closure
479 * @data: the buffer containing the data to write
480 * @length: the amount of data to write
481 *
482 * #cairo_write_func_t is the type of function which is called when a
483 * backend needs to write data to an output stream. It is passed the
484 * closure which was specified by the user at the time the write
485 * function was registered, the data to write and the length of the
486 * data in bytes. The write function should return
487 * %CAIRO_STATUS_SUCCESS if all the data was successfully written,
488 * %CAIRO_STATUS_WRITE_ERROR otherwise.
489 *
490 * Returns: the status code of the write operation
491 *
492 * Since: 1.0
493 **/
494typedef cairo_status_t (*cairo_write_func_t) (void *closure,
495 const unsigned char *data,
496 unsigned int length);
497
498/**
499 * cairo_read_func_t:
500 * @closure: the input closure
501 * @data: the buffer into which to read the data
502 * @length: the amount of data to read
503 *
504 * #cairo_read_func_t is the type of function which is called when a
505 * backend needs to read data from an input stream. It is passed the
506 * closure which was specified by the user at the time the read
507 * function was registered, the buffer to read the data into and the
508 * length of the data in bytes. The read function should return
509 * %CAIRO_STATUS_SUCCESS if all the data was successfully read,
510 * %CAIRO_STATUS_READ_ERROR otherwise.
511 *
512 * Returns: the status code of the read operation
513 *
514 * Since: 1.0
515 **/
516typedef cairo_status_t (*cairo_read_func_t) (void *closure,
517 unsigned char *data,
518 unsigned int length);
519
520/**
521 * cairo_rectangle_int_t:
522 * @x: X coordinate of the left side of the rectangle
523 * @y: Y coordinate of the top side of the rectangle
524 * @width: width of the rectangle
525 * @height: height of the rectangle
526 *
527 * A data structure for holding a rectangle with integer coordinates.
528 *
529 * Since: 1.10
530 **/
531
536
537
538/* Functions for manipulating state objects */
541
544
545cairo_public void
547
548cairo_public unsigned int
550
551cairo_public void *
553 const cairo_user_data_key_t *key);
554
557 const cairo_user_data_key_t *key,
558 void *user_data,
559 cairo_destroy_func_t destroy);
560
561cairo_public void
563
564cairo_public void
566
567cairo_public void
569
570cairo_public void
572
575
576cairo_public void
578
579/* Modify state */
580
581/**
582 * cairo_operator_t:
583 * @CAIRO_OPERATOR_CLEAR: clear destination layer (bounded) (Since 1.0)
584 * @CAIRO_OPERATOR_SOURCE: replace destination layer (bounded) (Since 1.0)
585 * @CAIRO_OPERATOR_OVER: draw source layer on top of destination layer
586 * (bounded) (Since 1.0)
587 * @CAIRO_OPERATOR_IN: draw source where there was destination content
588 * (unbounded) (Since 1.0)
589 * @CAIRO_OPERATOR_OUT: draw source where there was no destination
590 * content (unbounded) (Since 1.0)
591 * @CAIRO_OPERATOR_ATOP: draw source on top of destination content and
592 * only there (Since 1.0)
593 * @CAIRO_OPERATOR_DEST: ignore the source (Since 1.0)
594 * @CAIRO_OPERATOR_DEST_OVER: draw destination on top of source (Since 1.0)
595 * @CAIRO_OPERATOR_DEST_IN: leave destination only where there was
596 * source content (unbounded) (Since 1.0)
597 * @CAIRO_OPERATOR_DEST_OUT: leave destination only where there was no
598 * source content (Since 1.0)
599 * @CAIRO_OPERATOR_DEST_ATOP: leave destination on top of source content
600 * and only there (unbounded) (Since 1.0)
601 * @CAIRO_OPERATOR_XOR: source and destination are shown where there is only
602 * one of them (Since 1.0)
603 * @CAIRO_OPERATOR_ADD: source and destination layers are accumulated (Since 1.0)
604 * @CAIRO_OPERATOR_SATURATE: like over, but assuming source and dest are
605 * disjoint geometries (Since 1.0)
606 * @CAIRO_OPERATOR_MULTIPLY: source and destination layers are multiplied.
607 * This causes the result to be at least as dark as the darker inputs. (Since 1.10)
608 * @CAIRO_OPERATOR_SCREEN: source and destination are complemented and
609 * multiplied. This causes the result to be at least as light as the lighter
610 * inputs. (Since 1.10)
611 * @CAIRO_OPERATOR_OVERLAY: multiplies or screens, depending on the
612 * lightness of the destination color. (Since 1.10)
613 * @CAIRO_OPERATOR_DARKEN: replaces the destination with the source if it
614 * is darker, otherwise keeps the source. (Since 1.10)
615 * @CAIRO_OPERATOR_LIGHTEN: replaces the destination with the source if it
616 * is lighter, otherwise keeps the source. (Since 1.10)
617 * @CAIRO_OPERATOR_COLOR_DODGE: brightens the destination color to reflect
618 * the source color. (Since 1.10)
619 * @CAIRO_OPERATOR_COLOR_BURN: darkens the destination color to reflect
620 * the source color. (Since 1.10)
621 * @CAIRO_OPERATOR_HARD_LIGHT: Multiplies or screens, dependent on source
622 * color. (Since 1.10)
623 * @CAIRO_OPERATOR_SOFT_LIGHT: Darkens or lightens, dependent on source
624 * color. (Since 1.10)
625 * @CAIRO_OPERATOR_DIFFERENCE: Takes the difference of the source and
626 * destination color. (Since 1.10)
627 * @CAIRO_OPERATOR_EXCLUSION: Produces an effect similar to difference, but
628 * with lower contrast. (Since 1.10)
629 * @CAIRO_OPERATOR_HSL_HUE: Creates a color with the hue of the source
630 * and the saturation and luminosity of the target. (Since 1.10)
631 * @CAIRO_OPERATOR_HSL_SATURATION: Creates a color with the saturation
632 * of the source and the hue and luminosity of the target. Painting with
633 * this mode onto a gray area produces no change. (Since 1.10)
634 * @CAIRO_OPERATOR_HSL_COLOR: Creates a color with the hue and saturation
635 * of the source and the luminosity of the target. This preserves the gray
636 * levels of the target and is useful for coloring monochrome images or
637 * tinting color images. (Since 1.10)
638 * @CAIRO_OPERATOR_HSL_LUMINOSITY: Creates a color with the luminosity of
639 * the source and the hue and saturation of the target. This produces an
640 * inverse effect to @CAIRO_OPERATOR_HSL_COLOR. (Since 1.10)
641 *
642 * #cairo_operator_t is used to set the compositing operator for all cairo
643 * drawing operations.
644 *
645 * The default operator is %CAIRO_OPERATOR_OVER.
646 *
647 * The operators marked as <firstterm>unbounded</firstterm> modify their
648 * destination even outside of the mask layer (that is, their effect is not
649 * bound by the mask layer). However, their effect can still be limited by
650 * way of clipping.
651 *
652 * To keep things simple, the operator descriptions here
653 * document the behavior for when both source and destination are either fully
654 * transparent or fully opaque. The actual implementation works for
655 * translucent layers too.
656 * For a more detailed explanation of the effects of each operator, including
657 * the mathematical definitions, see
658 * <ulink url="https://cairographics.org/operators/">https://cairographics.org/operators/</ulink>.
659 *
660 * Since: 1.0
661 **/
697
698cairo_public void
700
701cairo_public void
703
704cairo_public void
705cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue);
706
707cairo_public void
709 double red, double green, double blue,
710 double alpha);
711
712cairo_public void
714 cairo_surface_t *surface,
715 double x,
716 double y);
717
718cairo_public void
719cairo_set_tolerance (cairo_t *cr, double tolerance);
720
721/**
722 * cairo_antialias_t:
723 * @CAIRO_ANTIALIAS_DEFAULT: Use the default antialiasing for
724 * the subsystem and target device, since 1.0
725 * @CAIRO_ANTIALIAS_NONE: Use a bilevel alpha mask, since 1.0
726 * @CAIRO_ANTIALIAS_GRAY: Perform single-color antialiasing (using
727 * shades of gray for black text on a white background, for example), since 1.0
728 * @CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking
729 * advantage of the order of subpixel elements on devices
730 * such as LCD panels, since 1.0
731 * @CAIRO_ANTIALIAS_FAST: Hint that the backend should perform some
732 * antialiasing but prefer speed over quality, since 1.12
733 * @CAIRO_ANTIALIAS_GOOD: The backend should balance quality against
734 * performance, since 1.12
735 * @CAIRO_ANTIALIAS_BEST: Hint that the backend should render at the highest
736 * quality, sacrificing speed if necessary, since 1.12
737 *
738 * Specifies the type of antialiasing to do when rendering text or shapes.
739 *
740 * As it is not necessarily clear from the above what advantages a particular
741 * antialias method provides, since 1.12, there is also a set of hints:
742 * @CAIRO_ANTIALIAS_FAST: Allow the backend to degrade raster quality for speed
743 * @CAIRO_ANTIALIAS_GOOD: A balance between speed and quality
744 * @CAIRO_ANTIALIAS_BEST: A high-fidelity, but potentially slow, raster mode
745 *
746 * These make no guarantee on how the backend will perform its rasterisation
747 * (if it even rasterises!), nor that they have any differing effect other
748 * than to enable some form of antialiasing. In the case of glyph rendering,
749 * @CAIRO_ANTIALIAS_FAST and @CAIRO_ANTIALIAS_GOOD will be mapped to
750 * @CAIRO_ANTIALIAS_GRAY, with @CAIRO_ANTALIAS_BEST being equivalent to
751 * @CAIRO_ANTIALIAS_SUBPIXEL.
752 *
753 * The interpretation of @CAIRO_ANTIALIAS_DEFAULT is left entirely up to
754 * the backend, typically this will be similar to @CAIRO_ANTIALIAS_GOOD.
755 *
756 * Since: 1.0
757 **/
771
772cairo_public void
774
775/**
776 * cairo_fill_rule_t:
777 * @CAIRO_FILL_RULE_WINDING: If the path crosses the ray from
778 * left-to-right, counts +1. If the path crosses the ray
779 * from right to left, counts -1. (Left and right are determined
780 * from the perspective of looking along the ray from the starting
781 * point.) If the total count is non-zero, the point will be filled. (Since 1.0)
782 * @CAIRO_FILL_RULE_EVEN_ODD: Counts the total number of
783 * intersections, without regard to the orientation of the contour. If
784 * the total number of intersections is odd, the point will be
785 * filled. (Since 1.0)
786 *
787 * #cairo_fill_rule_t is used to select how paths are filled. For both
788 * fill rules, whether or not a point is included in the fill is
789 * determined by taking a ray from that point to infinity and looking
790 * at intersections with the path. The ray can be in any direction,
791 * as long as it doesn't pass through the end point of a segment
792 * or have a tricky intersection such as intersecting tangent to the path.
793 * (Note that filling is not actually implemented in this way. This
794 * is just a description of the rule that is applied.)
795 *
796 * The default fill rule is %CAIRO_FILL_RULE_WINDING.
797 *
798 * New entries may be added in future versions.
799 *
800 * Since: 1.0
801 **/
806
807cairo_public void
809
810cairo_public void
811cairo_set_line_width (cairo_t *cr, double width);
812
813cairo_public void
815
816/**
817 * cairo_line_cap_t:
818 * @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point (Since 1.0)
819 * @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point (Since 1.0)
820 * @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point (Since 1.0)
821 *
822 * Specifies how to render the endpoints of the path when stroking.
823 *
824 * The default line cap style is %CAIRO_LINE_CAP_BUTT.
825 *
826 * Since: 1.0
827 **/
833
834cairo_public void
836
837/**
838 * cairo_line_join_t:
839 * @CAIRO_LINE_JOIN_MITER: use a sharp (angled) corner, see
840 * cairo_set_miter_limit() (Since 1.0)
841 * @CAIRO_LINE_JOIN_ROUND: use a rounded join, the center of the circle is the
842 * joint point (Since 1.0)
843 * @CAIRO_LINE_JOIN_BEVEL: use a cut-off join, the join is cut off at half
844 * the line width from the joint point (Since 1.0)
845 *
846 * Specifies how to render the junction of two lines when stroking.
847 *
848 * The default line join style is %CAIRO_LINE_JOIN_MITER.
849 *
850 * Since: 1.0
851 **/
857
858cairo_public void
860
861cairo_public void
863 const double *dashes,
864 int num_dashes,
865 double offset);
866
867cairo_public void
868cairo_set_miter_limit (cairo_t *cr, double limit);
869
870cairo_public void
871cairo_translate (cairo_t *cr, double tx, double ty);
872
873cairo_public void
874cairo_scale (cairo_t *cr, double sx, double sy);
875
876cairo_public void
877cairo_rotate (cairo_t *cr, double angle);
878
879cairo_public void
881 const cairo_matrix_t *matrix);
882
883cairo_public void
885 const cairo_matrix_t *matrix);
886
887cairo_public void
889
890cairo_public void
891cairo_user_to_device (cairo_t *cr, double *x, double *y);
892
893cairo_public void
894cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy);
895
896cairo_public void
897cairo_device_to_user (cairo_t *cr, double *x, double *y);
898
899cairo_public void
900cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy);
901
902/* Path creation functions */
903cairo_public void
905
906cairo_public void
907cairo_move_to (cairo_t *cr, double x, double y);
908
909cairo_public void
911
912cairo_public void
913cairo_line_to (cairo_t *cr, double x, double y);
914
915cairo_public void
917 double x1, double y1,
918 double x2, double y2,
919 double x3, double y3);
920
921cairo_public void
923 double xc, double yc,
924 double radius,
925 double angle1, double angle2);
926
927cairo_public void
929 double xc, double yc,
930 double radius,
931 double angle1, double angle2);
932
933/* XXX: NYI
934cairo_public void
935cairo_arc_to (cairo_t *cr,
936 double x1, double y1,
937 double x2, double y2,
938 double radius);
939*/
940
941cairo_public void
942cairo_rel_move_to (cairo_t *cr, double dx, double dy);
943
944cairo_public void
945cairo_rel_line_to (cairo_t *cr, double dx, double dy);
946
947cairo_public void
949 double dx1, double dy1,
950 double dx2, double dy2,
951 double dx3, double dy3);
952
953cairo_public void
955 double x, double y,
956 double width, double height);
957
958/* XXX: NYI
959cairo_public void
960cairo_stroke_to_path (cairo_t *cr);
961*/
962
963cairo_public void
965
966cairo_public void
968 double *x1, double *y1,
969 double *x2, double *y2);
970
971/* Painting functions */
972cairo_public void
974
975cairo_public void
977 double alpha);
978
979cairo_public void
981 cairo_pattern_t *pattern);
982
983cairo_public void
985 cairo_surface_t *surface,
986 double surface_x,
987 double surface_y);
988
989cairo_public void
991
992cairo_public void
994
995cairo_public void
997
998cairo_public void
1000
1001cairo_public void
1003
1004cairo_public void
1006
1007/* Insideness testing */
1009cairo_in_stroke (cairo_t *cr, double x, double y);
1010
1012cairo_in_fill (cairo_t *cr, double x, double y);
1013
1015cairo_in_clip (cairo_t *cr, double x, double y);
1016
1017/* Rectangular extents */
1018cairo_public void
1020 double *x1, double *y1,
1021 double *x2, double *y2);
1022
1023cairo_public void
1025 double *x1, double *y1,
1026 double *x2, double *y2);
1027
1028/* Clipping */
1029cairo_public void
1031
1032cairo_public void
1034
1035cairo_public void
1037
1038cairo_public void
1040 double *x1, double *y1,
1041 double *x2, double *y2);
1042
1043/**
1044 * cairo_rectangle_t:
1045 * @x: X coordinate of the left side of the rectangle
1046 * @y: Y coordinate of the top side of the rectangle
1047 * @width: width of the rectangle
1048 * @height: height of the rectangle
1049 *
1050 * A data structure for holding a rectangle.
1051 *
1052 * Since: 1.4
1053 **/
1057
1058/**
1059 * cairo_rectangle_list_t:
1060 * @status: Error status of the rectangle list
1061 * @rectangles: Array containing the rectangles
1062 * @num_rectangles: Number of rectangles in this list
1063 *
1064 * A data structure for holding a dynamically allocated
1065 * array of rectangles.
1066 *
1067 * Since: 1.4
1068 **/
1074
1077
1078cairo_public void
1080
1081/* Logical structure tagging functions */
1082
1083#define CAIRO_TAG_DEST "cairo.dest"
1084#define CAIRO_TAG_LINK "Link"
1085#define CAIRO_TAG_CONTENT "cairo.content"
1086#define CAIRO_TAG_CONTENT_REF "cairo.content_ref"
1087
1088cairo_public void
1089cairo_tag_begin (cairo_t *cr, const char *tag_name, const char *attributes);
1090
1091cairo_public void
1092cairo_tag_end (cairo_t *cr, const char *tag_name);
1093
1094/* Font/Text functions */
1095
1096/**
1097 * cairo_scaled_font_t:
1098 *
1099 * A #cairo_scaled_font_t is a font scaled to a particular size and device
1100 * resolution. A #cairo_scaled_font_t is most useful for low-level font
1101 * usage where a library or application wants to cache a reference
1102 * to a scaled font to speed up the computation of metrics.
1103 *
1104 * There are various types of scaled fonts, depending on the
1105 * <firstterm>font backend</firstterm> they use. The type of a
1106 * scaled font can be queried using cairo_scaled_font_get_type().
1107 *
1108 * Memory management of #cairo_scaled_font_t is done with
1109 * cairo_scaled_font_reference() and cairo_scaled_font_destroy().
1110 *
1111 * Since: 1.0
1112 **/
1113typedef struct _cairo_scaled_font cairo_scaled_font_t;
1114
1115/**
1116 * cairo_font_face_t:
1117 *
1118 * A #cairo_font_face_t specifies all aspects of a font other
1119 * than the size or font matrix (a font matrix is used to distort
1120 * a font by shearing it or scaling it unequally in the two
1121 * directions) . A font face can be set on a #cairo_t by using
1122 * cairo_set_font_face(); the size and font matrix are set with
1123 * cairo_set_font_size() and cairo_set_font_matrix().
1124 *
1125 * There are various types of font faces, depending on the
1126 * <firstterm>font backend</firstterm> they use. The type of a
1127 * font face can be queried using cairo_font_face_get_type().
1128 *
1129 * Memory management of #cairo_font_face_t is done with
1130 * cairo_font_face_reference() and cairo_font_face_destroy().
1131 *
1132 * Since: 1.0
1133 **/
1134typedef struct _cairo_font_face cairo_font_face_t;
1135
1136/**
1137 * cairo_glyph_t:
1138 * @index: glyph index in the font. The exact interpretation of the
1139 * glyph index depends on the font technology being used.
1140 * @x: the offset in the X direction between the origin used for
1141 * drawing or measuring the string and the origin of this glyph.
1142 * @y: the offset in the Y direction between the origin used for
1143 * drawing or measuring the string and the origin of this glyph.
1144 *
1145 * The #cairo_glyph_t structure holds information about a single glyph
1146 * when drawing or measuring text. A font is (in simple terms) a
1147 * collection of shapes used to draw text. A glyph is one of these
1148 * shapes. There can be multiple glyphs for a single character
1149 * (alternates to be used in different contexts, for example), or a
1150 * glyph can be a <firstterm>ligature</firstterm> of multiple
1151 * characters. Cairo doesn't expose any way of converting input text
1152 * into glyphs, so in order to use the Cairo interfaces that take
1153 * arrays of glyphs, you must directly access the appropriate
1154 * underlying font system.
1155 *
1156 * Note that the offsets given by @x and @y are not cumulative. When
1157 * drawing or measuring text, each glyph is individually positioned
1158 * with respect to the overall origin
1159 *
1160 * Since: 1.0
1161 **/
1162typedef struct {
1163 unsigned long index;
1164 double x;
1165 double y;
1167
1169cairo_glyph_allocate (int num_glyphs);
1170
1171cairo_public void
1173
1174/**
1175 * cairo_text_cluster_t:
1176 * @num_bytes: the number of bytes of UTF-8 text covered by cluster
1177 * @num_glyphs: the number of glyphs covered by cluster
1178 *
1179 * The #cairo_text_cluster_t structure holds information about a single
1180 * <firstterm>text cluster</firstterm>. A text cluster is a minimal
1181 * mapping of some glyphs corresponding to some UTF-8 text.
1182 *
1183 * For a cluster to be valid, both @num_bytes and @num_glyphs should
1184 * be non-negative, and at least one should be non-zero.
1185 * Note that clusters with zero glyphs are not as well supported as
1186 * normal clusters. For example, PDF rendering applications typically
1187 * ignore those clusters when PDF text is being selected.
1188 *
1189 * See cairo_show_text_glyphs() for how clusters are used in advanced
1190 * text operations.
1191 *
1192 * Since: 1.8
1193 **/
1194typedef struct {
1198
1201
1202cairo_public void
1204
1205/**
1206 * cairo_text_cluster_flags_t:
1207 * @CAIRO_TEXT_CLUSTER_FLAG_BACKWARD: The clusters in the cluster array
1208 * map to glyphs in the glyph array from end to start. (Since 1.8)
1209 *
1210 * Specifies properties of a text cluster mapping.
1211 *
1212 * Since: 1.8
1213 **/
1217
1218/**
1219 * cairo_text_extents_t:
1220 * @x_bearing: the horizontal distance from the origin to the
1221 * leftmost part of the glyphs as drawn. Positive if the
1222 * glyphs lie entirely to the right of the origin.
1223 * @y_bearing: the vertical distance from the origin to the
1224 * topmost part of the glyphs as drawn. Positive only if the
1225 * glyphs lie completely below the origin; will usually be
1226 * negative.
1227 * @width: width of the glyphs as drawn
1228 * @height: height of the glyphs as drawn
1229 * @x_advance:distance to advance in the X direction
1230 * after drawing these glyphs
1231 * @y_advance: distance to advance in the Y direction
1232 * after drawing these glyphs. Will typically be zero except
1233 * for vertical text layout as found in East-Asian languages.
1234 *
1235 * The #cairo_text_extents_t structure stores the extents of a single
1236 * glyph or a string of glyphs in user-space coordinates. Because text
1237 * extents are in user-space coordinates, they are mostly, but not
1238 * entirely, independent of the current transformation matrix. If you call
1239 * <literal>cairo_scale(cr, 2.0, 2.0)</literal>, text will
1240 * be drawn twice as big, but the reported text extents will not be
1241 * doubled. They will change slightly due to hinting (so you can't
1242 * assume that metrics are independent of the transformation matrix),
1243 * but otherwise will remain unchanged.
1244 *
1245 * Since: 1.0
1246 **/
1247typedef struct {
1250 double width;
1251 double height;
1255
1256/**
1257 * cairo_font_extents_t:
1258 * @ascent: the distance that the font extends above the baseline.
1259 * Note that this is not always exactly equal to the maximum
1260 * of the extents of all the glyphs in the font, but rather
1261 * is picked to express the font designer's intent as to
1262 * how the font should align with elements above it.
1263 * @descent: the distance that the font extends below the baseline.
1264 * This value is positive for typical fonts that include
1265 * portions below the baseline. Note that this is not always
1266 * exactly equal to the maximum of the extents of all the
1267 * glyphs in the font, but rather is picked to express the
1268 * font designer's intent as to how the font should
1269 * align with elements below it.
1270 * @height: the recommended vertical distance between baselines when
1271 * setting consecutive lines of text with the font. This
1272 * is greater than @ascent+@descent by a
1273 * quantity known as the <firstterm>line spacing</firstterm>
1274 * or <firstterm>external leading</firstterm>. When space
1275 * is at a premium, most fonts can be set with only
1276 * a distance of @ascent+@descent between lines.
1277 * @max_x_advance: the maximum distance in the X direction that
1278 * the origin is advanced for any glyph in the font.
1279 * @max_y_advance: the maximum distance in the Y direction that
1280 * the origin is advanced for any glyph in the font.
1281 * This will be zero for normal fonts used for horizontal
1282 * writing. (The scripts of East Asia are sometimes written
1283 * vertically.)
1284 *
1285 * The #cairo_font_extents_t structure stores metric information for
1286 * a font. Values are given in the current user-space coordinate
1287 * system.
1288 *
1289 * Because font metrics are in user-space coordinates, they are
1290 * mostly, but not entirely, independent of the current transformation
1291 * matrix. If you call <literal>cairo_scale(cr, 2.0, 2.0)</literal>,
1292 * text will be drawn twice as big, but the reported text extents will
1293 * not be doubled. They will change slightly due to hinting (so you
1294 * can't assume that metrics are independent of the transformation
1295 * matrix), but otherwise will remain unchanged.
1296 *
1297 * Since: 1.0
1298 **/
1299typedef struct {
1300 double ascent;
1301 double descent;
1302 double height;
1306
1307/**
1308 * cairo_font_slant_t:
1309 * @CAIRO_FONT_SLANT_NORMAL: Upright font style, since 1.0
1310 * @CAIRO_FONT_SLANT_ITALIC: Italic font style, since 1.0
1311 * @CAIRO_FONT_SLANT_OBLIQUE: Oblique font style, since 1.0
1312 *
1313 * Specifies variants of a font face based on their slant.
1314 *
1315 * Since: 1.0
1316 **/
1322
1323/**
1324 * cairo_font_weight_t:
1325 * @CAIRO_FONT_WEIGHT_NORMAL: Normal font weight, since 1.0
1326 * @CAIRO_FONT_WEIGHT_BOLD: Bold font weight, since 1.0
1327 *
1328 * Specifies variants of a font face based on their weight.
1329 *
1330 * Since: 1.0
1331 **/
1336
1337/**
1338 * cairo_subpixel_order_t:
1339 * @CAIRO_SUBPIXEL_ORDER_DEFAULT: Use the default subpixel order for
1340 * for the target device, since 1.0
1341 * @CAIRO_SUBPIXEL_ORDER_RGB: Subpixel elements are arranged horizontally
1342 * with red at the left, since 1.0
1343 * @CAIRO_SUBPIXEL_ORDER_BGR: Subpixel elements are arranged horizontally
1344 * with blue at the left, since 1.0
1345 * @CAIRO_SUBPIXEL_ORDER_VRGB: Subpixel elements are arranged vertically
1346 * with red at the top, since 1.0
1347 * @CAIRO_SUBPIXEL_ORDER_VBGR: Subpixel elements are arranged vertically
1348 * with blue at the top, since 1.0
1349 *
1350 * The subpixel order specifies the order of color elements within
1351 * each pixel on the display device when rendering with an
1352 * antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
1353 *
1354 * Since: 1.0
1355 **/
1363
1364/**
1365 * cairo_hint_style_t:
1366 * @CAIRO_HINT_STYLE_DEFAULT: Use the default hint style for
1367 * font backend and target device, since 1.0
1368 * @CAIRO_HINT_STYLE_NONE: Do not hint outlines, since 1.0
1369 * @CAIRO_HINT_STYLE_SLIGHT: Hint outlines slightly to improve
1370 * contrast while retaining good fidelity to the original
1371 * shapes, since 1.0
1372 * @CAIRO_HINT_STYLE_MEDIUM: Hint outlines with medium strength
1373 * giving a compromise between fidelity to the original shapes
1374 * and contrast, since 1.0
1375 * @CAIRO_HINT_STYLE_FULL: Hint outlines to maximize contrast, since 1.0
1376 *
1377 * Specifies the type of hinting to do on font outlines. Hinting
1378 * is the process of fitting outlines to the pixel grid in order
1379 * to improve the appearance of the result. Since hinting outlines
1380 * involves distorting them, it also reduces the faithfulness
1381 * to the original outline shapes. Not all of the outline hinting
1382 * styles are supported by all font backends.
1383 *
1384 * New entries may be added in future versions.
1385 *
1386 * Since: 1.0
1387 **/
1395
1396/**
1397 * cairo_hint_metrics_t:
1398 * @CAIRO_HINT_METRICS_DEFAULT: Hint metrics in the default
1399 * manner for the font backend and target device, since 1.0
1400 * @CAIRO_HINT_METRICS_OFF: Do not hint font metrics, since 1.0
1401 * @CAIRO_HINT_METRICS_ON: Hint font metrics, since 1.0
1402 *
1403 * Specifies whether to hint font metrics; hinting font metrics
1404 * means quantizing them so that they are integer values in
1405 * device space. Doing this improves the consistency of
1406 * letter and line spacing, however it also means that text
1407 * will be laid out differently at different zoom factors.
1408 *
1409 * Since: 1.0
1410 **/
1416
1417/**
1418 * cairo_color_mode_t:
1419 * @CAIRO_COLOR_MODE_DEFAULT: Use the default color mode for
1420 * font backend and target device, since 1.18.
1421 * @CAIRO_COLOR_MODE_NO_COLOR: Disable rendering color glyphs. Glyphs are
1422 * always rendered as outline glyphs, since 1.18.
1423 * @CAIRO_COLOR_MODE_COLOR: Enable rendering color glyphs. If the font
1424 * contains a color presentation for a glyph, and when supported by
1425 * the font backend, the glyph will be rendered in color, since 1.18.
1426 *
1427 * Specifies if color fonts are to be rendered using the color
1428 * glyphs or outline glyphs. Glyphs that do not have a color
1429 * presentation, and non-color fonts are not affected by this font
1430 * option.
1431 *
1432 * Since: 1.18
1433 **/
1439
1440/**
1441 * cairo_font_options_t:
1442 *
1443 * An opaque structure holding all options that are used when
1444 * rendering fonts.
1445 *
1446 * Individual features of a #cairo_font_options_t can be set or
1447 * accessed using functions named
1448 * <function>cairo_font_options_set_<emphasis>feature_name</emphasis>()</function> and
1449 * <function>cairo_font_options_get_<emphasis>feature_name</emphasis>()</function>, like
1450 * cairo_font_options_set_antialias() and
1451 * cairo_font_options_get_antialias().
1452 *
1453 * New features may be added to a #cairo_font_options_t in the
1454 * future. For this reason, cairo_font_options_copy(),
1455 * cairo_font_options_equal(), cairo_font_options_merge(), and
1456 * cairo_font_options_hash() should be used to copy, check
1457 * for equality, merge, or compute a hash value of
1458 * #cairo_font_options_t objects.
1459 *
1460 * Since: 1.0
1461 **/
1462typedef struct _cairo_font_options cairo_font_options_t;
1463
1466
1469
1470cairo_public void
1472
1475
1476cairo_public void
1478 const cairo_font_options_t *other);
1481 const cairo_font_options_t *other);
1482
1483cairo_public unsigned long
1485
1486cairo_public void
1488 cairo_antialias_t antialias);
1491
1492cairo_public void
1494 cairo_subpixel_order_t subpixel_order);
1497
1498cairo_public void
1500 cairo_hint_style_t hint_style);
1503
1504cairo_public void
1506 cairo_hint_metrics_t hint_metrics);
1509
1510cairo_public const char *
1512
1513cairo_public void
1515 const char *variations);
1516
1517#define CAIRO_COLOR_PALETTE_DEFAULT 0
1518
1519cairo_public void
1521 cairo_color_mode_t color_mode);
1522
1525
1526cairo_public unsigned int
1528
1529cairo_public void
1531 unsigned int palette_index);
1532
1533cairo_public void
1535 unsigned int index,
1536 double red, double green,
1537 double blue, double alpha);
1538
1541 unsigned int index,
1542 double *red, double *green,
1543 double *blue, double *alpha);
1544
1545/* This interface is for dealing with text as text, not caring about the
1546 font object inside the cairo_t. */
1547
1548cairo_public void
1550 const char *family,
1551 cairo_font_slant_t slant,
1552 cairo_font_weight_t weight);
1553
1554cairo_public void
1555cairo_set_font_size (cairo_t *cr, double size);
1556
1557cairo_public void
1559 const cairo_matrix_t *matrix);
1560
1561cairo_public void
1563 cairo_matrix_t *matrix);
1564
1565cairo_public void
1567 const cairo_font_options_t *options);
1568
1569cairo_public void
1571 cairo_font_options_t *options);
1572
1573cairo_public void
1575
1578
1579cairo_public void
1581 const cairo_scaled_font_t *scaled_font);
1582
1585
1586cairo_public void
1587cairo_show_text (cairo_t *cr, const char *utf8);
1588
1589cairo_public void
1590cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1591
1592cairo_public void
1594 const char *utf8,
1595 int utf8_len,
1596 const cairo_glyph_t *glyphs,
1597 int num_glyphs,
1598 const cairo_text_cluster_t *clusters,
1599 int num_clusters,
1600 cairo_text_cluster_flags_t cluster_flags);
1601
1602cairo_public void
1603cairo_text_path (cairo_t *cr, const char *utf8);
1604
1605cairo_public void
1606cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs);
1607
1608cairo_public void
1610 const char *utf8,
1611 cairo_text_extents_t *extents);
1612
1613cairo_public void
1615 const cairo_glyph_t *glyphs,
1616 int num_glyphs,
1617 cairo_text_extents_t *extents);
1618
1619cairo_public void
1621 cairo_font_extents_t *extents);
1622
1623/* Generic identifier for a font style */
1624
1627
1628cairo_public void
1630
1631cairo_public unsigned int
1633
1636
1637
1638/**
1639 * cairo_font_type_t:
1640 * @CAIRO_FONT_TYPE_TOY: The font was created using cairo's toy font api (Since: 1.2)
1641 * @CAIRO_FONT_TYPE_FT: The font is of type FreeType (Since: 1.2)
1642 * @CAIRO_FONT_TYPE_WIN32: The font is of type Win32 (Since: 1.2)
1643 * @CAIRO_FONT_TYPE_QUARTZ: The font is of type Quartz (Since: 1.6, in 1.2 and
1644 * 1.4 it was named CAIRO_FONT_TYPE_ATSUI)
1645 * @CAIRO_FONT_TYPE_USER: The font was create using cairo's user font api (Since: 1.8)
1646 * @CAIRO_FONT_TYPE_DWRITE: The font is of type Win32 DWrite (Since: 1.18)
1647 *
1648 * #cairo_font_type_t is used to describe the type of a given font
1649 * face or scaled font. The font types are also known as "font
1650 * backends" within cairo.
1651 *
1652 * The type of a font face is determined by the function used to
1653 * create it, which will generally be of the form
1654 * <function>cairo_<emphasis>type</emphasis>_font_face_create(<!-- -->)</function>.
1655 * The font face type can be queried with cairo_font_face_get_type()
1656 *
1657 * The various #cairo_font_face_t functions can be used with a font face
1658 * of any type.
1659 *
1660 * The type of a scaled font is determined by the type of the font
1661 * face passed to cairo_scaled_font_create(). The scaled font type can
1662 * be queried with cairo_scaled_font_get_type()
1663 *
1664 * The various #cairo_scaled_font_t functions can be used with scaled
1665 * fonts of any type, but some font backends also provide
1666 * type-specific functions that must only be called with a scaled font
1667 * of the appropriate type. These functions have names that begin with
1668 * <function>cairo_<emphasis>type</emphasis>_scaled_font(<!-- -->)</function>
1669 * such as cairo_ft_scaled_font_lock_face().
1670 *
1671 * The behavior of calling a type-specific function with a scaled font
1672 * of the wrong type is undefined.
1673 *
1674 * New entries may be added in future versions.
1675 *
1676 * Since: 1.2
1677 **/
1686
1689
1690cairo_public void *
1692 const cairo_user_data_key_t *key);
1693
1696 const cairo_user_data_key_t *key,
1697 void *user_data,
1698 cairo_destroy_func_t destroy);
1699
1700/* Portable interface to general font features. */
1701
1704 const cairo_matrix_t *font_matrix,
1705 const cairo_matrix_t *ctm,
1706 const cairo_font_options_t *options);
1707
1710
1711cairo_public void
1713
1714cairo_public unsigned int
1716
1719
1722
1723cairo_public void *
1725 const cairo_user_data_key_t *key);
1726
1729 const cairo_user_data_key_t *key,
1730 void *user_data,
1731 cairo_destroy_func_t destroy);
1732
1733cairo_public void
1735 cairo_font_extents_t *extents);
1736
1737cairo_public void
1739 const char *utf8,
1740 cairo_text_extents_t *extents);
1741
1742cairo_public void
1744 const cairo_glyph_t *glyphs,
1745 int num_glyphs,
1746 cairo_text_extents_t *extents);
1747
1750 double x,
1751 double y,
1752 const char *utf8,
1753 int utf8_len,
1754 cairo_glyph_t **glyphs,
1755 int *num_glyphs,
1756 cairo_text_cluster_t **clusters,
1757 int *num_clusters,
1758 cairo_text_cluster_flags_t *cluster_flags);
1759
1762
1763cairo_public void
1765 cairo_matrix_t *font_matrix);
1766
1767cairo_public void
1769 cairo_matrix_t *ctm);
1770
1771cairo_public void
1773 cairo_matrix_t *scale_matrix);
1774
1775cairo_public void
1777 cairo_font_options_t *options);
1778
1779
1780/* Toy fonts */
1781
1783cairo_toy_font_face_create (const char *family,
1784 cairo_font_slant_t slant,
1785 cairo_font_weight_t weight);
1786
1787cairo_public const char *
1789
1792
1795
1796
1797/* User fonts */
1798
1801
1802/* User-font method signatures */
1803
1804/**
1805 * cairo_user_scaled_font_init_func_t:
1806 * @scaled_font: the scaled-font being created
1807 * @cr: a cairo context, in font space
1808 * @extents: font extents to fill in, in font space
1809 *
1810 * #cairo_user_scaled_font_init_func_t is the type of function which is
1811 * called when a scaled-font needs to be created for a user font-face.
1812 *
1813 * The cairo context @cr is not used by the caller, but is prepared in font
1814 * space, similar to what the cairo contexts passed to the render_glyph
1815 * method will look like. The callback can use this context for extents
1816 * computation for example. After the callback is called, @cr is checked
1817 * for any error status.
1818 *
1819 * The @extents argument is where the user font sets the font extents for
1820 * @scaled_font. It is in font space, which means that for most cases its
1821 * ascent and descent members should add to 1.0. @extents is preset to
1822 * hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
1823 * descent and max_y_advance members.
1824 *
1825 * The callback is optional. If not set, default font extents as described
1826 * in the previous paragraph will be used.
1827 *
1828 * Note that @scaled_font is not fully initialized at this
1829 * point and trying to use it for text operations in the callback will result
1830 * in deadlock.
1831 *
1832 * Returns: %CAIRO_STATUS_SUCCESS upon success, or an error status on error.
1833 *
1834 * Since: 1.8
1835 **/
1837 cairo_t *cr,
1838 cairo_font_extents_t *extents);
1839
1840/**
1841 * cairo_user_scaled_font_render_glyph_func_t:
1842 * @scaled_font: user scaled-font
1843 * @glyph: glyph code to render
1844 * @cr: cairo context to draw to, in font space
1845 * @extents: glyph extents to fill in, in font space
1846 *
1847 * #cairo_user_scaled_font_render_glyph_func_t is the type of function which
1848 * is called when a user scaled-font needs to render a glyph.
1849 *
1850 * The callback is mandatory, and expected to draw the glyph with code @glyph to
1851 * the cairo context @cr. @cr is prepared such that the glyph drawing is done in
1852 * font space. That is, the matrix set on @cr is the scale matrix of @scaled_font.
1853 * The @extents argument is where the user font sets the font extents for
1854 * @scaled_font. However, if user prefers to draw in user space, they can
1855 * achieve that by changing the matrix on @cr.
1856 *
1857 * All cairo rendering operations to @cr are permitted. However, when
1858 * this callback is set with
1859 * cairo_user_font_face_set_render_glyph_func(), the result is
1860 * undefined if any source other than the default source on @cr is
1861 * used. That means, glyph bitmaps should be rendered using
1862 * cairo_mask() instead of cairo_paint().
1863 *
1864 * When this callback is set with
1865 * cairo_user_font_face_set_render_color_glyph_func(), the default
1866 * source is black. Setting the source is a valid
1867 * operation. cairo_user_scaled_font_get_foreground_marker() or
1868 * cairo_user_scaled_font_get_foreground_source() may be called to
1869 * obtain the current source at the time the glyph is rendered.
1870 *
1871 * Other non-default settings on @cr include a font size of 1.0 (given that
1872 * it is set up to be in font space), and font options corresponding to
1873 * @scaled_font.
1874 *
1875 * The @extents argument is preset to have <literal>x_bearing</literal>,
1876 * <literal>width</literal>, and <literal>y_advance</literal> of zero,
1877 * <literal>y_bearing</literal> set to <literal>-font_extents.ascent</literal>,
1878 * <literal>height</literal> to <literal>font_extents.ascent+font_extents.descent</literal>,
1879 * and <literal>x_advance</literal> to <literal>font_extents.max_x_advance</literal>.
1880 * The only field user needs to set in majority of cases is
1881 * <literal>x_advance</literal>.
1882 * If the <literal>width</literal> field is zero upon the callback returning
1883 * (which is its preset value), the glyph extents are automatically computed
1884 * based on the drawings done to @cr. This is in most cases exactly what the
1885 * desired behavior is. However, if for any reason the callback sets the
1886 * extents, it must be ink extents, and include the extents of all drawing
1887 * done to @cr in the callback.
1888 *
1889 * Where both color and non-color callbacks has been set using
1890 * cairo_user_font_face_set_render_color_glyph_func(), and
1891 * cairo_user_font_face_set_render_glyph_func(), the color glyph
1892 * callback will be called first. If the color glyph callback returns
1893 * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, any drawing operations are
1894 * discarded and the non-color callback will be called. This is the
1895 * only case in which the %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED may
1896 * be returned from a render callback. This fallback sequence allows a
1897 * user font face to contain a combination of both color and non-color
1898 * glyphs.
1899 *
1900 * Returns: %CAIRO_STATUS_SUCCESS upon success,
1901 * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1902 * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1903 *
1904 * Since: 1.8
1905 **/
1907 unsigned long glyph,
1908 cairo_t *cr,
1909 cairo_text_extents_t *extents);
1910
1911/**
1912 * cairo_user_scaled_font_text_to_glyphs_func_t:
1913 * @scaled_font: the scaled-font being created
1914 * @utf8: a string of text encoded in UTF-8
1915 * @utf8_len: length of @utf8 in bytes
1916 * @glyphs: pointer to array of glyphs to fill, in font space
1917 * @num_glyphs: pointer to number of glyphs
1918 * @clusters: pointer to array of cluster mapping information to fill, or %NULL
1919 * @num_clusters: pointer to number of clusters
1920 * @cluster_flags: pointer to location to store cluster flags corresponding to the
1921 * output @clusters
1922 *
1923 * #cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which
1924 * is called to convert input text to an array of glyphs. This is used by the
1925 * cairo_show_text() operation.
1926 *
1927 * Using this callback the user-font has full control on glyphs and their
1928 * positions. That means, it allows for features like ligatures and kerning,
1929 * as well as complex <firstterm>shaping</firstterm> required for scripts like
1930 * Arabic and Indic.
1931 *
1932 * The @num_glyphs argument is preset to the number of glyph entries available
1933 * in the @glyphs buffer. If the @glyphs buffer is %NULL, the value of
1934 * @num_glyphs will be zero. If the provided glyph array is too short for
1935 * the conversion (or for convenience), a new glyph array may be allocated
1936 * using cairo_glyph_allocate() and placed in @glyphs. Upon return,
1937 * @num_glyphs should contain the number of generated glyphs. If the value
1938 * @glyphs points at has changed after the call, the caller will free the
1939 * allocated glyph array using cairo_glyph_free(). The caller will also free
1940 * the original value of @glyphs, so the callback shouldn't do so.
1941 * The callback should populate the glyph indices and positions (in font space)
1942 * assuming that the text is to be shown at the origin.
1943 *
1944 * If @clusters is not %NULL, @num_clusters and @cluster_flags are also
1945 * non-%NULL, and cluster mapping should be computed. The semantics of how
1946 * cluster array allocation works is similar to the glyph array. That is,
1947 * if @clusters initially points to a non-%NULL value, that array may be used
1948 * as a cluster buffer, and @num_clusters points to the number of cluster
1949 * entries available there. If the provided cluster array is too short for
1950 * the conversion (or for convenience), a new cluster array may be allocated
1951 * using cairo_text_cluster_allocate() and placed in @clusters. In this case,
1952 * the original value of @clusters will still be freed by the caller. Upon
1953 * return, @num_clusters should contain the number of generated clusters.
1954 * If the value @clusters points at has changed after the call, the caller
1955 * will free the allocated cluster array using cairo_text_cluster_free().
1956 *
1957 * The callback is optional. If @num_glyphs is negative upon
1958 * the callback returning or if the return value
1959 * is %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback
1960 * is tried. See #cairo_user_scaled_font_unicode_to_glyph_func_t.
1961 *
1962 * Note: While cairo does not impose any limitation on glyph indices,
1963 * some applications may assume that a glyph index fits in a 16-bit
1964 * unsigned integer. As such, it is advised that user-fonts keep their
1965 * glyphs in the 0 to 65535 range. Furthermore, some applications may
1966 * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
1967 * are advised to use glyph 0 for such purposes and do not use that
1968 * glyph value for other purposes.
1969 *
1970 * Returns: %CAIRO_STATUS_SUCCESS upon success,
1971 * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
1972 * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
1973 *
1974 * Since: 1.8
1975 **/
1977 const char *utf8,
1978 int utf8_len,
1979 cairo_glyph_t **glyphs,
1980 int *num_glyphs,
1981 cairo_text_cluster_t **clusters,
1982 int *num_clusters,
1983 cairo_text_cluster_flags_t *cluster_flags);
1984
1985/**
1986 * cairo_user_scaled_font_unicode_to_glyph_func_t:
1987 * @scaled_font: the scaled-font being created
1988 * @unicode: input unicode character code-point
1989 * @glyph_index: output glyph index
1990 *
1991 * #cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which
1992 * is called to convert an input Unicode character to a single glyph.
1993 * This is used by the cairo_show_text() operation.
1994 *
1995 * This callback is used to provide the same functionality as the
1996 * text_to_glyphs callback does (see #cairo_user_scaled_font_text_to_glyphs_func_t)
1997 * but has much less control on the output,
1998 * in exchange for increased ease of use. The inherent assumption to using
1999 * this callback is that each character maps to one glyph, and that the
2000 * mapping is context independent. It also assumes that glyphs are positioned
2001 * according to their advance width. These mean no ligatures, kerning, or
2002 * complex scripts can be implemented using this callback.
2003 *
2004 * The callback is optional, and only used if text_to_glyphs callback is not
2005 * set or fails to return glyphs. If this callback is not set or if it returns
2006 * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode
2007 * code-points to glyph indices is assumed.
2008 *
2009 * Note: While cairo does not impose any limitation on glyph indices,
2010 * some applications may assume that a glyph index fits in a 16-bit
2011 * unsigned integer. As such, it is advised that user-fonts keep their
2012 * glyphs in the 0 to 65535 range. Furthermore, some applications may
2013 * assume that glyph 0 is a special glyph-not-found glyph. User-fonts
2014 * are advised to use glyph 0 for such purposes and do not use that
2015 * glyph value for other purposes.
2016 *
2017 * Returns: %CAIRO_STATUS_SUCCESS upon success,
2018 * %CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried,
2019 * or %CAIRO_STATUS_USER_FONT_ERROR or any other error status on error.
2020 *
2021 * Since: 1.8
2022 **/
2024 unsigned long unicode,
2025 unsigned long *glyph_index);
2026
2027/* User-font method setters */
2028
2029cairo_public void
2032
2033cairo_public void
2036
2037cairo_public void
2040
2041cairo_public void
2044
2045cairo_public void
2048
2049/* User-font method getters */
2050
2053
2056
2059
2062
2065
2068
2071
2072/* Query functions */
2073
2076
2079
2080cairo_public double
2082
2085
2088
2089cairo_public void
2090cairo_get_current_point (cairo_t *cr, double *x, double *y);
2091
2094
2095cairo_public double
2097
2100
2103
2106
2107cairo_public double
2109
2110cairo_public int
2112
2113cairo_public void
2114cairo_get_dash (cairo_t *cr, double *dashes, double *offset);
2115
2116cairo_public void
2118
2121
2124
2125/**
2126 * cairo_path_data_type_t:
2127 * @CAIRO_PATH_MOVE_TO: A move-to operation, since 1.0
2128 * @CAIRO_PATH_LINE_TO: A line-to operation, since 1.0
2129 * @CAIRO_PATH_CURVE_TO: A curve-to operation, since 1.0
2130 * @CAIRO_PATH_CLOSE_PATH: A close-path operation, since 1.0
2131 *
2132 * #cairo_path_data_t is used to describe the type of one portion
2133 * of a path when represented as a #cairo_path_t.
2134 * See #cairo_path_data_t for details.
2135 *
2136 * Since: 1.0
2137 **/
2144
2145/**
2146 * cairo_path_data_t:
2147 *
2148 * #cairo_path_data_t is used to represent the path data inside a
2149 * #cairo_path_t.
2150 *
2151 * The data structure is designed to try to balance the demands of
2152 * efficiency and ease-of-use. A path is represented as an array of
2153 * #cairo_path_data_t, which is a union of headers and points.
2154 *
2155 * Each portion of the path is represented by one or more elements in
2156 * the array, (one header followed by 0 or more points). The length
2157 * value of the header is the number of array elements for the current
2158 * portion including the header, (ie. length == 1 + # of points), and
2159 * where the number of points for each element type is as follows:
2160 *
2161 * <programlisting>
2162 * %CAIRO_PATH_MOVE_TO: 1 point
2163 * %CAIRO_PATH_LINE_TO: 1 point
2164 * %CAIRO_PATH_CURVE_TO: 3 points
2165 * %CAIRO_PATH_CLOSE_PATH: 0 points
2166 * </programlisting>
2167 *
2168 * The semantics and ordering of the coordinate values are consistent
2169 * with cairo_move_to(), cairo_line_to(), cairo_curve_to(), and
2170 * cairo_close_path().
2171 *
2172 * Here is sample code for iterating through a #cairo_path_t:
2173 *
2174 * <informalexample><programlisting>
2175 * int i;
2176 * cairo_path_t *path;
2177 * cairo_path_data_t *data;
2178 * &nbsp;
2179 * path = cairo_copy_path (cr);
2180 * &nbsp;
2181 * for (i=0; i < path->num_data; i += path->data[i].header.length) {
2182 * data = &amp;path->data[i];
2183 * switch (data->header.type) {
2184 * case CAIRO_PATH_MOVE_TO:
2185 * do_move_to_things (data[1].point.x, data[1].point.y);
2186 * break;
2187 * case CAIRO_PATH_LINE_TO:
2188 * do_line_to_things (data[1].point.x, data[1].point.y);
2189 * break;
2190 * case CAIRO_PATH_CURVE_TO:
2191 * do_curve_to_things (data[1].point.x, data[1].point.y,
2192 * data[2].point.x, data[2].point.y,
2193 * data[3].point.x, data[3].point.y);
2194 * break;
2195 * case CAIRO_PATH_CLOSE_PATH:
2196 * do_close_path_things ();
2197 * break;
2198 * }
2199 * }
2200 * cairo_path_destroy (path);
2201 * </programlisting></informalexample>
2202 *
2203 * As of cairo 1.4, cairo does not mind if there are more elements in
2204 * a portion of the path than needed. Such elements can be used by
2205 * users of the cairo API to hold extra values in the path data
2206 * structure. For this reason, it is recommended that applications
2207 * always use <literal>data->header.length</literal> to
2208 * iterate over the path data, instead of hardcoding the number of
2209 * elements for each element type.
2210 *
2211 * Since: 1.0
2212 **/
2215 struct {
2219 struct {
2220 double x, y;
2222};
2223
2224/**
2225 * cairo_path_t:
2226 * @status: the current error status
2227 * @data: the elements in the path
2228 * @num_data: the number of elements in the data array
2229 *
2230 * A data structure for holding a path. This data structure serves as
2231 * the return value for cairo_copy_path() and
2232 * cairo_copy_path_flat() as well the input value for
2233 * cairo_append_path().
2234 *
2235 * See #cairo_path_data_t for hints on how to iterate over the
2236 * actual data within the path.
2237 *
2238 * The num_data member gives the number of elements in the data
2239 * array. This number is larger than the number of independent path
2240 * portions (defined in #cairo_path_data_type_t), since the data
2241 * includes both headers and coordinates for each portion.
2242 *
2243 * Since: 1.0
2244 **/
2250
2253
2256
2257cairo_public void
2259 const cairo_path_t *path);
2260
2261cairo_public void
2263
2264/* Error status queries */
2265
2268
2269cairo_public const char *
2271
2272/* Backend device manipulation */
2273
2276
2277/**
2278 * cairo_device_type_t:
2279 * @CAIRO_DEVICE_TYPE_DRM: The device is of type Direct Render Manager, since 1.10
2280 * @CAIRO_DEVICE_TYPE_GL: The device is of type OpenGL, since 1.10
2281 * @CAIRO_DEVICE_TYPE_SCRIPT: The device is of type script, since 1.10
2282 * @CAIRO_DEVICE_TYPE_XCB: The device is of type xcb, since 1.10
2283 * @CAIRO_DEVICE_TYPE_XLIB: The device is of type xlib, since 1.10
2284 * @CAIRO_DEVICE_TYPE_XML: The device is of type XML, since 1.10
2285 * @CAIRO_DEVICE_TYPE_COGL: The device is of type cogl, since 1.12
2286 * @CAIRO_DEVICE_TYPE_WIN32: The device is of type win32, since 1.12
2287 * @CAIRO_DEVICE_TYPE_INVALID: The device is invalid, since 1.10
2288 *
2289 * #cairo_device_type_t is used to describe the type of a given
2290 * device. The devices types are also known as "backends" within cairo.
2291 *
2292 * The device type can be queried with cairo_device_get_type()
2293 *
2294 * The various #cairo_device_t functions can be used with devices of
2295 * any type, but some backends also provide type-specific functions
2296 * that must only be called with a device of the appropriate
2297 * type. These functions have names that begin with
2298 * <literal>cairo_<emphasis>type</emphasis>_device</literal> such as
2299 * cairo_xcb_device_debug_cap_xrender_version().
2300 *
2301 * The behavior of calling a type-specific function with a device of
2302 * the wrong type is undefined.
2303 *
2304 * New entries may be added in future versions.
2305 *
2306 * Since: 1.10
2307 **/
2320
2323
2326
2329
2330cairo_public void
2332
2333cairo_public void
2335
2336cairo_public void
2338
2339cairo_public void
2341
2342cairo_public unsigned int
2344
2345cairo_public void *
2347 const cairo_user_data_key_t *key);
2348
2351 const cairo_user_data_key_t *key,
2352 void *user_data,
2353 cairo_destroy_func_t destroy);
2354
2355
2356/* Surface manipulation */
2357
2360 cairo_content_t content,
2361 int width,
2362 int height);
2363
2367 int width,
2368 int height);
2369
2372 const cairo_rectangle_int_t *extents);
2373
2374cairo_public void
2376 cairo_surface_t *image);
2377
2380 double x,
2381 double y,
2382 double width,
2383 double height);
2384
2385/**
2386 * cairo_surface_observer_mode_t:
2387 * @CAIRO_SURFACE_OBSERVER_NORMAL: no recording is done
2388 * @CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS: operations are recorded
2389 *
2390 * Whether operations should be recorded.
2391 *
2392 * Since: 1.12
2393 **/
2398
2402
2403/**
2404 * cairo_surface_observer_callback_t:
2405 * @observer: the #cairo_surface_observer_t
2406 * @target: the observed surface
2407 * @data: closure used when adding the callback
2408 *
2409 * A generic callback function for surface operations.
2410 *
2411 * Since: 1.12
2412 **/
2414 cairo_surface_t *target,
2415 void *data);
2416
2420 void *data);
2421
2425 void *data);
2426
2430 void *data);
2431
2435 void *data);
2436
2440 void *data);
2441
2445 void *data);
2446
2450 void *data);
2451
2454 cairo_write_func_t write_func,
2455 void *closure);
2456cairo_public double
2458
2461 cairo_write_func_t write_func,
2462 void *closure);
2463
2464cairo_public double
2466
2467cairo_public double
2469
2470cairo_public double
2472
2473cairo_public double
2475
2476cairo_public double
2478
2479cairo_public double
2481
2484
2485cairo_public void
2487
2488cairo_public void
2490
2493
2494cairo_public unsigned int
2496
2499
2500/**
2501 * cairo_surface_type_t:
2502 * @CAIRO_SURFACE_TYPE_IMAGE: The surface is of type image, since 1.2
2503 * @CAIRO_SURFACE_TYPE_PDF: The surface is of type pdf, since 1.2
2504 * @CAIRO_SURFACE_TYPE_PS: The surface is of type ps, since 1.2
2505 * @CAIRO_SURFACE_TYPE_XLIB: The surface is of type xlib, since 1.2
2506 * @CAIRO_SURFACE_TYPE_XCB: The surface is of type xcb, since 1.2
2507 * @CAIRO_SURFACE_TYPE_GLITZ: The surface is of type glitz, since 1.2, deprecated 1.18
2508 * (glitz support have been removed, this surface type will never be set by cairo)
2509 * @CAIRO_SURFACE_TYPE_QUARTZ: The surface is of type quartz, since 1.2
2510 * @CAIRO_SURFACE_TYPE_WIN32: The surface is of type win32, since 1.2
2511 * @CAIRO_SURFACE_TYPE_BEOS: The surface is of type beos, since 1.2, deprecated 1.18
2512 * (beos support have been removed, this surface type will never be set by cairo)
2513 * @CAIRO_SURFACE_TYPE_DIRECTFB: The surface is of type directfb, since 1.2, deprecated 1.18
2514 * (directfb support have been removed, this surface type will never be set by cairo)
2515 * @CAIRO_SURFACE_TYPE_SVG: The surface is of type svg, since 1.2
2516 * @CAIRO_SURFACE_TYPE_OS2: The surface is of type os2, since 1.4, deprecated 1.18
2517 * (os2 support have been removed, this surface type will never be set by cairo)
2518 * @CAIRO_SURFACE_TYPE_WIN32_PRINTING: The surface is a win32 printing surface, since 1.6
2519 * @CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: The surface is of type quartz_image, since 1.6
2520 * @CAIRO_SURFACE_TYPE_SCRIPT: The surface is of type script, since 1.10
2521 * @CAIRO_SURFACE_TYPE_QT: The surface is of type Qt, since 1.10, deprecated 1.18
2522 * (Ot support have been removed, this surface type will never be set by cairo)
2523 * @CAIRO_SURFACE_TYPE_RECORDING: The surface is of type recording, since 1.10
2524 * @CAIRO_SURFACE_TYPE_VG: The surface is a OpenVG surface, since 1.10, deprecated 1.18
2525 * (OpenVG support have been removed, this surface type will never be set by cairo)
2526 * @CAIRO_SURFACE_TYPE_GL: The surface is of type OpenGL, since 1.10, deprecated 1.18
2527 * (OpenGL support have been removed, this surface type will never be set by cairo)
2528 * @CAIRO_SURFACE_TYPE_DRM: The surface is of type Direct Render Manager, since 1.10, deprecated 1.18
2529 * (DRM support have been removed, this surface type will never be set by cairo)
2530 * @CAIRO_SURFACE_TYPE_TEE: The surface is of type 'tee' (a multiplexing surface), since 1.10
2531 * @CAIRO_SURFACE_TYPE_XML: The surface is of type XML (for debugging), since 1.10
2532 * @CAIRO_SURFACE_TYPE_SKIA: The surface is of type Skia, since 1.10, deprecated 1.18
2533 * (Skia support have been removed, this surface type will never be set by cairo)
2534 * @CAIRO_SURFACE_TYPE_SUBSURFACE: The surface is a subsurface created with
2535 * cairo_surface_create_for_rectangle(), since 1.10
2536 * @CAIRO_SURFACE_TYPE_COGL: This surface is of type Cogl, since 1.12, deprecated 1.18
2537 * (Cogl support have been removed, this surface type will never be set by cairo)
2538 *
2539 * #cairo_surface_type_t is used to describe the type of a given
2540 * surface. The surface types are also known as "backends" or "surface
2541 * backends" within cairo.
2542 *
2543 * The type of a surface is determined by the function used to create
2544 * it, which will generally be of the form
2545 * <function>cairo_<emphasis>type</emphasis>_surface_create(<!-- -->)</function>,
2546 * (though see cairo_surface_create_similar() as well).
2547 *
2548 * The surface type can be queried with cairo_surface_get_type()
2549 *
2550 * The various #cairo_surface_t functions can be used with surfaces of
2551 * any type, but some backends also provide type-specific functions
2552 * that must only be called with a surface of the appropriate
2553 * type. These functions have names that begin with
2554 * <literal>cairo_<emphasis>type</emphasis>_surface</literal> such as cairo_image_surface_get_width().
2555 *
2556 * The behavior of calling a type-specific function with a surface of
2557 * the wrong type is undefined.
2558 *
2559 * New entries may be added in future versions.
2560 *
2561 * Since: 1.2
2562 **/
2590
2593
2596
2597#if CAIRO_HAS_PNG_FUNCTIONS
2598
2601 const char *filename);
2602
2605 cairo_write_func_t write_func,
2606 void *closure);
2607
2608#endif
2609
2610cairo_public void *
2612 const cairo_user_data_key_t *key);
2613
2616 const cairo_user_data_key_t *key,
2617 void *user_data,
2618 cairo_destroy_func_t destroy);
2619
2620#define CAIRO_MIME_TYPE_JPEG "image/jpeg"
2621#define CAIRO_MIME_TYPE_PNG "image/png"
2622#define CAIRO_MIME_TYPE_JP2 "image/jp2"
2623#define CAIRO_MIME_TYPE_URI "text/x-uri"
2624#define CAIRO_MIME_TYPE_UNIQUE_ID "application/x-cairo.uuid"
2625#define CAIRO_MIME_TYPE_JBIG2 "application/x-cairo.jbig2"
2626#define CAIRO_MIME_TYPE_JBIG2_GLOBAL "application/x-cairo.jbig2-global"
2627#define CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID "application/x-cairo.jbig2-global-id"
2628#define CAIRO_MIME_TYPE_CCITT_FAX "image/g3fax"
2629#define CAIRO_MIME_TYPE_CCITT_FAX_PARAMS "application/x-cairo.ccitt.params"
2630#define CAIRO_MIME_TYPE_EPS "application/postscript"
2631#define CAIRO_MIME_TYPE_EPS_PARAMS "application/x-cairo.eps.params"
2632
2633cairo_public void
2635 const char *mime_type,
2636 const unsigned char **data,
2637 unsigned long *length);
2638
2641 const char *mime_type,
2642 const unsigned char *data,
2643 unsigned long length,
2644 cairo_destroy_func_t destroy,
2645 void *closure);
2646
2649 const char *mime_type);
2650
2651cairo_public void
2653 cairo_font_options_t *options);
2654
2655cairo_public void
2657
2658cairo_public void
2660
2661cairo_public void
2663 int x,
2664 int y,
2665 int width,
2666 int height);
2667
2668cairo_public void
2670 double x_scale,
2671 double y_scale);
2672
2673cairo_public void
2675 double *x_scale,
2676 double *y_scale);
2677
2678cairo_public void
2680 double x_offset,
2681 double y_offset);
2682
2683cairo_public void
2685 double *x_offset,
2686 double *y_offset);
2687
2688cairo_public void
2690 double x_pixels_per_inch,
2691 double y_pixels_per_inch);
2692
2693cairo_public void
2695 double *x_pixels_per_inch,
2696 double *y_pixels_per_inch);
2697
2698cairo_public void
2700
2701cairo_public void
2703
2706
2707/* Image-surface functions */
2708
2711 int width,
2712 int height);
2713
2714cairo_public int
2716 int width);
2717
2721 int width,
2722 int height,
2723 int stride);
2724
2725cairo_public unsigned char *
2727
2730
2731cairo_public int
2733
2734cairo_public int
2736
2737cairo_public int
2739
2740#if CAIRO_HAS_PNG_FUNCTIONS
2741
2744
2747 void *closure);
2748
2749#endif
2750
2751/* Recording-surface functions */
2752
2755 const cairo_rectangle_t *extents);
2756
2757cairo_public void
2759 double *x0,
2760 double *y0,
2761 double *width,
2762 double *height);
2763
2766 cairo_rectangle_t *extents);
2767
2768/* raster-source pattern (callback) functions */
2769
2770/**
2771 * cairo_raster_source_acquire_func_t:
2772 * @pattern: the pattern being rendered from
2773 * @callback_data: the user data supplied during creation
2774 * @target: the rendering target surface
2775 * @extents: rectangular region of interest in pixels in sample space
2776 *
2777 * #cairo_raster_source_acquire_func_t is the type of function which is
2778 * called when a pattern is being rendered from. It should create a surface
2779 * that provides the pixel data for the region of interest as defined by
2780 * extents, though the surface itself does not have to be limited to that
2781 * area. For convenience the surface should probably be of image type,
2782 * created with cairo_surface_create_similar_image() for the target (which
2783 * enables the number of copies to be reduced during transfer to the
2784 * device). Another option, might be to return a similar surface to the
2785 * target for explicit handling by the application of a set of cached sources
2786 * on the device. The region of sample data provided should be defined using
2787 * cairo_surface_set_device_offset() to specify the top-left corner of the
2788 * sample data (along with width and height of the surface).
2789 *
2790 * Returns: a #cairo_surface_t
2791 *
2792 * Since: 1.12
2793 **/
2795(*cairo_raster_source_acquire_func_t) (cairo_pattern_t *pattern,
2796 void *callback_data,
2797 cairo_surface_t *target,
2798 const cairo_rectangle_int_t *extents);
2799
2800/**
2801 * cairo_raster_source_release_func_t:
2802 * @pattern: the pattern being rendered from
2803 * @callback_data: the user data supplied during creation
2804 * @surface: the surface created during acquire
2805 *
2806 * #cairo_raster_source_release_func_t is the type of function which is
2807 * called when the pixel data is no longer being access by the pattern
2808 * for the rendering operation. Typically this function will simply
2809 * destroy the surface created during acquire.
2810 *
2811 * Since: 1.12
2812 **/
2813typedef void
2815 void *callback_data,
2816 cairo_surface_t *surface);
2817
2818/**
2819 * cairo_raster_source_snapshot_func_t:
2820 * @pattern: the pattern being rendered from
2821 * @callback_data: the user data supplied during creation
2822 *
2823 * #cairo_raster_source_snapshot_func_t is the type of function which is
2824 * called when the pixel data needs to be preserved for later use
2825 * during printing. This pattern will be accessed again later, and it
2826 * is expected to provide the pixel data that was current at the time
2827 * of snapshotting.
2828 *
2829 * Return value: CAIRO_STATUS_SUCCESS on success, or one of the
2830 * #cairo_status_t error codes for failure.
2831 *
2832 * Since: 1.12
2833 **/
2836 void *callback_data);
2837
2838/**
2839 * cairo_raster_source_copy_func_t:
2840 * @pattern: the #cairo_pattern_t that was copied to
2841 * @callback_data: the user data supplied during creation
2842 * @other: the #cairo_pattern_t being used as the source for the copy
2843 *
2844 * #cairo_raster_source_copy_func_t is the type of function which is
2845 * called when the pattern gets copied as a normal part of rendering.
2846 *
2847 * Return value: CAIRO_STATUS_SUCCESS on success, or one of the
2848 * #cairo_status_t error codes for failure.
2849 *
2850 * Since: 1.12
2851 **/
2854 void *callback_data,
2855 const cairo_pattern_t *other);
2856
2857/**
2858 * cairo_raster_source_finish_func_t:
2859 * @pattern: the pattern being rendered from
2860 * @callback_data: the user data supplied during creation
2861 *
2862 * #cairo_raster_source_finish_func_t is the type of function which is
2863 * called when the pattern (or a copy thereof) is no longer required.
2864 *
2865 * Since: 1.12
2866 **/
2867typedef void
2869 void *callback_data);
2870
2873 cairo_content_t content,
2874 int width, int height);
2875
2876cairo_public void
2878 void *data);
2879
2880cairo_public void *
2882
2883cairo_public void
2887
2888cairo_public void
2892cairo_public void
2895
2898
2899cairo_public void
2902
2905
2906cairo_public void
2909
2912
2913/* Pattern creation functions */
2914
2916cairo_pattern_create_rgb (double red, double green, double blue);
2917
2919cairo_pattern_create_rgba (double red, double green, double blue,
2920 double alpha);
2921
2924
2926cairo_pattern_create_linear (double x0, double y0,
2927 double x1, double y1);
2928
2930cairo_pattern_create_radial (double cx0, double cy0, double radius0,
2931 double cx1, double cy1, double radius1);
2932
2935
2938
2939cairo_public void
2941
2942cairo_public unsigned int
2944
2947
2948cairo_public void *
2950 const cairo_user_data_key_t *key);
2951
2954 const cairo_user_data_key_t *key,
2955 void *user_data,
2956 cairo_destroy_func_t destroy);
2957
2958/**
2959 * cairo_pattern_type_t:
2960 * @CAIRO_PATTERN_TYPE_SOLID: The pattern is a solid (uniform)
2961 * color. It may be opaque or translucent, since 1.2.
2962 * @CAIRO_PATTERN_TYPE_SURFACE: The pattern is a based on a surface (an image), since 1.2.
2963 * @CAIRO_PATTERN_TYPE_LINEAR: The pattern is a linear gradient, since 1.2.
2964 * @CAIRO_PATTERN_TYPE_RADIAL: The pattern is a radial gradient, since 1.2.
2965 * @CAIRO_PATTERN_TYPE_MESH: The pattern is a mesh, since 1.12.
2966 * @CAIRO_PATTERN_TYPE_RASTER_SOURCE: The pattern is a user pattern providing raster data, since 1.12.
2967 *
2968 * #cairo_pattern_type_t is used to describe the type of a given pattern.
2969 *
2970 * The type of a pattern is determined by the function used to create
2971 * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba()
2972 * functions create SOLID patterns. The remaining
2973 * cairo_pattern_create<!-- --> functions map to pattern types in obvious
2974 * ways.
2975 *
2976 * The pattern type can be queried with cairo_pattern_get_type()
2977 *
2978 * Most #cairo_pattern_t functions can be called with a pattern of any
2979 * type, (though trying to change the extend or filter for a solid
2980 * pattern will have no effect). A notable exception is
2981 * cairo_pattern_add_color_stop_rgb() and
2982 * cairo_pattern_add_color_stop_rgba() which must only be called with
2983 * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern
2984 * will be shutdown and put into an error state.
2985 *
2986 * New entries may be added in future versions.
2987 *
2988 * Since: 1.2
2989 **/
2998
3001
3002cairo_public void
3004 double offset,
3005 double red, double green, double blue);
3006
3007cairo_public void
3009 double offset,
3010 double red, double green, double blue,
3011 double alpha);
3012
3013cairo_public void
3015
3016cairo_public void
3018
3019cairo_public void
3021 double x1, double y1,
3022 double x2, double y2,
3023 double x3, double y3);
3024
3025cairo_public void
3027 double x, double y);
3028
3029cairo_public void
3031 double x, double y);
3032
3033cairo_public void
3035 unsigned int point_num,
3036 double x, double y);
3037
3038cairo_public void
3040 unsigned int corner_num,
3041 double red, double green, double blue);
3042
3043cairo_public void
3045 unsigned int corner_num,
3046 double red, double green, double blue,
3047 double alpha);
3048
3049cairo_public void
3051 const cairo_matrix_t *matrix);
3052
3053cairo_public void
3055 cairo_matrix_t *matrix);
3056
3057/**
3058 * cairo_extend_t:
3059 * @CAIRO_EXTEND_NONE: pixels outside of the source pattern
3060 * are fully transparent (Since 1.0)
3061 * @CAIRO_EXTEND_REPEAT: the pattern is tiled by repeating (Since 1.0)
3062 * @CAIRO_EXTEND_REFLECT: the pattern is tiled by reflecting
3063 * at the edges (Since 1.0; but only implemented for surface patterns since 1.6)
3064 * @CAIRO_EXTEND_PAD: pixels outside of the pattern copy
3065 * the closest pixel from the source (Since 1.2; but only
3066 * implemented for surface patterns since 1.6)
3067 *
3068 * #cairo_extend_t is used to describe how pattern color/alpha will be
3069 * determined for areas "outside" the pattern's natural area, (for
3070 * example, outside the surface bounds or outside the gradient
3071 * geometry).
3072 *
3073 * Mesh patterns are not affected by the extend mode.
3074 *
3075 * The default extend mode is %CAIRO_EXTEND_NONE for surface patterns
3076 * and %CAIRO_EXTEND_PAD for gradient patterns.
3077 *
3078 * New entries may be added in future versions.
3079 *
3080 * Since: 1.0
3081 **/
3088
3089cairo_public void
3091
3094
3095/**
3096 * cairo_filter_t:
3097 * @CAIRO_FILTER_FAST: A high-performance filter, with quality similar
3098 * to %CAIRO_FILTER_NEAREST (Since 1.0)
3099 * @CAIRO_FILTER_GOOD: A reasonable-performance filter, with quality
3100 * similar to %CAIRO_FILTER_BILINEAR (Since 1.0)
3101 * @CAIRO_FILTER_BEST: The highest-quality available, performance may
3102 * not be suitable for interactive use. (Since 1.0)
3103 * @CAIRO_FILTER_NEAREST: Nearest-neighbor filtering (Since 1.0)
3104 * @CAIRO_FILTER_BILINEAR: Linear interpolation in two dimensions (Since 1.0)
3105 * @CAIRO_FILTER_GAUSSIAN: This filter value is currently
3106 * unimplemented, and should not be used in current code. (Since 1.0)
3107 *
3108 * #cairo_filter_t is used to indicate what filtering should be
3109 * applied when reading pixel values from patterns. See
3110 * cairo_pattern_set_filter() for indicating the desired filter to be
3111 * used with a particular pattern.
3112 *
3113 * Since: 1.0
3114 **/
3123
3124cairo_public void
3126
3129
3132 double *red, double *green,
3133 double *blue, double *alpha);
3134
3137 cairo_surface_t **surface);
3138
3139
3142 int index, double *offset,
3143 double *red, double *green,
3144 double *blue, double *alpha);
3145
3148 int *count);
3149
3152 double *x0, double *y0,
3153 double *x1, double *y1);
3154
3157 double *x0, double *y0, double *r0,
3158 double *x1, double *y1, double *r1);
3159
3162 unsigned int *count);
3163
3166 unsigned int patch_num);
3167
3170 unsigned int patch_num,
3171 unsigned int corner_num,
3172 double *red, double *green,
3173 double *blue, double *alpha);
3174
3177 unsigned int patch_num,
3178 unsigned int point_num,
3179 double *x, double *y);
3180
3181/* Matrix functions */
3182
3183cairo_public void
3185 double xx, double yx,
3186 double xy, double yy,
3187 double x0, double y0);
3188
3189cairo_public void
3191
3192cairo_public void
3194 double tx, double ty);
3195
3196cairo_public void
3198 double sx, double sy);
3199
3200cairo_public void
3202 double radians);
3203
3204cairo_public void
3205cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty);
3206
3207cairo_public void
3208cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy);
3209
3210cairo_public void
3211cairo_matrix_rotate (cairo_matrix_t *matrix, double radians);
3212
3215
3216cairo_public void
3218 const cairo_matrix_t *a,
3219 const cairo_matrix_t *b);
3220
3221cairo_public void
3223 double *dx, double *dy);
3224
3225cairo_public void
3227 double *x, double *y);
3228
3229/* Region functions */
3230
3231/**
3232 * cairo_region_t:
3233 *
3234 * A #cairo_region_t represents a set of integer-aligned rectangles.
3235 *
3236 * It allows set-theoretical operations like cairo_region_union() and
3237 * cairo_region_intersect() to be performed on them.
3238 *
3239 * Memory management of #cairo_region_t is done with
3240 * cairo_region_reference() and cairo_region_destroy().
3241 *
3242 * Since: 1.10
3243 **/
3244typedef struct _cairo_region cairo_region_t;
3245
3246/**
3247 * cairo_region_overlap_t:
3248 * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
3249 * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
3250 * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
3251 * partially outside the region. (Since 1.10)
3252 *
3253 * Used as the return value for cairo_region_contains_rectangle().
3254 *
3255 * Since: 1.10
3256 **/
3258 CAIRO_REGION_OVERLAP_IN, /* completely inside region */
3259 CAIRO_REGION_OVERLAP_OUT, /* completely outside region */
3260 CAIRO_REGION_OVERLAP_PART /* partly inside region */
3262
3265
3268
3271 int count);
3272
3275
3278
3279cairo_public void
3281
3284
3287
3288cairo_public void
3290 cairo_rectangle_int_t *extents);
3291
3292cairo_public int
3294
3295cairo_public void
3297 int nth,
3298 cairo_rectangle_int_t *rectangle);
3299
3302
3305 const cairo_rectangle_int_t *rectangle);
3306
3308cairo_region_contains_point (const cairo_region_t *region, int x, int y);
3309
3310cairo_public void
3311cairo_region_translate (cairo_region_t *region, int dx, int dy);
3312
3315
3318 const cairo_rectangle_int_t *rectangle);
3319
3322
3325 const cairo_rectangle_int_t *rectangle);
3326
3329
3332 const cairo_rectangle_int_t *rectangle);
3333
3336
3339 const cairo_rectangle_int_t *rectangle);
3340
3341/* Functions to be used while debugging (not intended for use in production code) */
3342cairo_public void
3344
3345
3347
3348#endif /* CAIRO_H */
cairo_public void cairo_tag_begin(cairo_t *cr, const char *tag_name, const char *attributes)
cairo_public cairo_bool_t cairo_recording_surface_get_extents(cairo_surface_t *surface, cairo_rectangle_t *extents)
cairo_public void cairo_region_get_extents(const cairo_region_t *region, cairo_rectangle_int_t *extents)
cairo_public cairo_line_join_t cairo_get_line_join(cairo_t *cr)
#define CAIRO_BEGIN_DECLS
Definition cairo.h:49
cairo_public cairo_operator_t cairo_get_operator(cairo_t *cr)
cairo_status_t(* cairo_user_scaled_font_unicode_to_glyph_func_t)(cairo_scaled_font_t *scaled_font, unsigned long unicode, unsigned long *glyph_index)
Definition cairo.h:2023
cairo_public cairo_status_t cairo_surface_observer_add_stroke_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public cairo_status_t cairo_pattern_get_rgba(cairo_pattern_t *pattern, double *red, double *green, double *blue, double *alpha)
cairo_public void cairo_set_source_surface(cairo_t *cr, cairo_surface_t *surface, double x, double y)
enum _cairo_font_slant cairo_font_slant_t
cairo_public cairo_status_t cairo_font_options_status(cairo_font_options_t *options)
struct _cairo_rectangle_int cairo_rectangle_int_t
cairo_public void cairo_rel_line_to(cairo_t *cr, double dx, double dy)
enum _cairo_operator cairo_operator_t
cairo_public void cairo_device_flush(cairo_device_t *device)
cairo_public cairo_surface_t * cairo_surface_create_similar_image(cairo_surface_t *other, cairo_format_t format, int width, int height)
enum _cairo_hint_style cairo_hint_style_t
cairo_public cairo_hint_metrics_t cairo_font_options_get_hint_metrics(const cairo_font_options_t *options)
cairo_public void cairo_matrix_init(cairo_matrix_t *matrix, double xx, double yx, double xy, double yy, double x0, double y0)
_cairo_surface_type
Definition cairo.h:2563
@ CAIRO_SURFACE_TYPE_OS2
Definition cairo.h:2575
@ CAIRO_SURFACE_TYPE_WIN32
Definition cairo.h:2571
@ CAIRO_SURFACE_TYPE_SKIA
Definition cairo.h:2586
@ CAIRO_SURFACE_TYPE_WIN32_PRINTING
Definition cairo.h:2576
@ CAIRO_SURFACE_TYPE_VG
Definition cairo.h:2581
@ CAIRO_SURFACE_TYPE_XLIB
Definition cairo.h:2567
@ CAIRO_SURFACE_TYPE_XCB
Definition cairo.h:2568
@ CAIRO_SURFACE_TYPE_DIRECTFB
Definition cairo.h:2573
@ CAIRO_SURFACE_TYPE_GL
Definition cairo.h:2582
@ CAIRO_SURFACE_TYPE_BEOS
Definition cairo.h:2572
@ CAIRO_SURFACE_TYPE_GLITZ
Definition cairo.h:2569
@ CAIRO_SURFACE_TYPE_SUBSURFACE
Definition cairo.h:2587
@ CAIRO_SURFACE_TYPE_COGL
Definition cairo.h:2588
@ CAIRO_SURFACE_TYPE_PDF
Definition cairo.h:2565
@ CAIRO_SURFACE_TYPE_QUARTZ_IMAGE
Definition cairo.h:2577
@ CAIRO_SURFACE_TYPE_QT
Definition cairo.h:2579
@ CAIRO_SURFACE_TYPE_PS
Definition cairo.h:2566
@ CAIRO_SURFACE_TYPE_SCRIPT
Definition cairo.h:2578
@ CAIRO_SURFACE_TYPE_TEE
Definition cairo.h:2584
@ CAIRO_SURFACE_TYPE_SVG
Definition cairo.h:2574
@ CAIRO_SURFACE_TYPE_XML
Definition cairo.h:2585
@ CAIRO_SURFACE_TYPE_DRM
Definition cairo.h:2583
@ CAIRO_SURFACE_TYPE_IMAGE
Definition cairo.h:2564
@ CAIRO_SURFACE_TYPE_QUARTZ
Definition cairo.h:2570
@ CAIRO_SURFACE_TYPE_RECORDING
Definition cairo.h:2580
cairo_public double cairo_device_observer_stroke_elapsed(cairo_device_t *abstract_device)
cairo_public void cairo_matrix_scale(cairo_matrix_t *matrix, double sx, double sy)
enum _cairo_filter cairo_filter_t
cairo_public cairo_bool_t cairo_region_equal(const cairo_region_t *a, const cairo_region_t *b)
cairo_public double cairo_get_line_width(cairo_t *cr)
cairo_public void cairo_font_options_set_antialias(cairo_font_options_t *options, cairo_antialias_t antialias)
cairo_public cairo_scaled_font_t * cairo_scaled_font_reference(cairo_scaled_font_t *scaled_font)
cairo_public void cairo_set_source_rgb(cairo_t *cr, double red, double green, double blue)
_cairo_line_join
Definition cairo.h:852
@ CAIRO_LINE_JOIN_ROUND
Definition cairo.h:854
@ CAIRO_LINE_JOIN_BEVEL
Definition cairo.h:855
@ CAIRO_LINE_JOIN_MITER
Definition cairo.h:853
_cairo_filter
Definition cairo.h:3115
@ CAIRO_FILTER_GOOD
Definition cairo.h:3117
@ CAIRO_FILTER_GAUSSIAN
Definition cairo.h:3121
@ CAIRO_FILTER_BEST
Definition cairo.h:3118
@ CAIRO_FILTER_BILINEAR
Definition cairo.h:3120
@ CAIRO_FILTER_FAST
Definition cairo.h:3116
@ CAIRO_FILTER_NEAREST
Definition cairo.h:3119
cairo_public cairo_status_t cairo_pattern_get_color_stop_rgba(cairo_pattern_t *pattern, int index, double *offset, double *red, double *green, double *blue, double *alpha)
cairo_public void cairo_device_finish(cairo_device_t *device)
cairo_public void cairo_raster_source_pattern_set_callback_data(cairo_pattern_t *pattern, void *data)
cairo_public void cairo_region_get_rectangle(const cairo_region_t *region, int nth, cairo_rectangle_int_t *rectangle)
cairo_public cairo_status_t cairo_surface_observer_print(cairo_surface_t *abstract_surface, cairo_write_func_t write_func, void *closure)
cairo_public cairo_user_scaled_font_render_glyph_func_t cairo_user_font_face_get_render_color_glyph_func(cairo_font_face_t *font_face)
_cairo_font_slant
Definition cairo.h:1317
@ CAIRO_FONT_SLANT_ITALIC
Definition cairo.h:1319
@ CAIRO_FONT_SLANT_OBLIQUE
Definition cairo.h:1320
@ CAIRO_FONT_SLANT_NORMAL
Definition cairo.h:1318
cairo_public cairo_device_type_t cairo_device_get_type(cairo_device_t *device)
cairo_public cairo_surface_t * cairo_image_surface_create_from_png(const char *filename)
struct _cairo_surface cairo_surface_t
Definition cairo.h:164
cairo_public cairo_font_type_t cairo_scaled_font_get_type(cairo_scaled_font_t *scaled_font)
cairo_public void cairo_mask(cairo_t *cr, cairo_pattern_t *pattern)
cairo_public cairo_surface_t * cairo_recording_surface_create(cairo_content_t content, const cairo_rectangle_t *extents)
cairo_public cairo_extend_t cairo_pattern_get_extend(cairo_pattern_t *pattern)
cairo_public void cairo_text_extents(cairo_t *cr, const char *utf8, cairo_text_extents_t *extents)
cairo_public void cairo_font_options_set_color_mode(cairo_font_options_t *options, cairo_color_mode_t color_mode)
struct cairo_path cairo_path_t
cairo_public cairo_user_scaled_font_init_func_t cairo_user_font_face_get_init_func(cairo_font_face_t *font_face)
cairo_public cairo_status_t cairo_matrix_invert(cairo_matrix_t *matrix)
struct _cairo cairo_t
Definition cairo.h:135
enum _cairo_fill_rule cairo_fill_rule_t
cairo_public void cairo_show_glyphs(cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
enum _cairo_antialias cairo_antialias_t
cairo_public void cairo_new_path(cairo_t *cr)
cairo_public void cairo_recording_surface_ink_extents(cairo_surface_t *surface, double *x0, double *y0, double *width, double *height)
cairo_public void cairo_show_page(cairo_t *cr)
cairo_surface_t *(* cairo_raster_source_acquire_func_t)(cairo_pattern_t *pattern, void *callback_data, cairo_surface_t *target, const cairo_rectangle_int_t *extents)
Definition cairo.h:2795
_cairo_subpixel_order
Definition cairo.h:1356
@ CAIRO_SUBPIXEL_ORDER_RGB
Definition cairo.h:1358
@ CAIRO_SUBPIXEL_ORDER_VBGR
Definition cairo.h:1361
@ CAIRO_SUBPIXEL_ORDER_BGR
Definition cairo.h:1359
@ CAIRO_SUBPIXEL_ORDER_DEFAULT
Definition cairo.h:1357
@ CAIRO_SUBPIXEL_ORDER_VRGB
Definition cairo.h:1360
cairo_public void cairo_font_options_set_custom_palette_color(cairo_font_options_t *options, unsigned int index, double red, double green, double blue, double alpha)
cairo_public void cairo_raster_source_pattern_set_finish(cairo_pattern_t *pattern, cairo_raster_source_finish_func_t finish)
#define CAIRO_END_DECLS
Definition cairo.h:50
cairo_public void cairo_matrix_multiply(cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b)
cairo_public void cairo_pattern_get_matrix(cairo_pattern_t *pattern, cairo_matrix_t *matrix)
cairo_public cairo_font_weight_t cairo_toy_font_face_get_weight(cairo_font_face_t *font_face)
cairo_status_t(* cairo_user_scaled_font_text_to_glyphs_func_t)(cairo_scaled_font_t *scaled_font, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *cluster_flags)
Definition cairo.h:1976
cairo_public void cairo_mesh_pattern_move_to(cairo_pattern_t *pattern, double x, double y)
cairo_public cairo_dither_t cairo_pattern_get_dither(cairo_pattern_t *pattern)
cairo_public cairo_status_t cairo_region_status(const cairo_region_t *region)
cairo_public cairo_status_t cairo_scaled_font_set_user_data(cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
cairo_public cairo_line_cap_t cairo_get_line_cap(cairo_t *cr)
cairo_public cairo_status_t cairo_scaled_font_status(cairo_scaled_font_t *scaled_font)
cairo_public void cairo_device_to_user_distance(cairo_t *cr, double *dx, double *dy)
cairo_public void cairo_pattern_add_color_stop_rgba(cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha)
cairo_public void cairo_move_to(cairo_t *cr, double x, double y)
_cairo_color_mode
Definition cairo.h:1434
@ CAIRO_COLOR_MODE_COLOR
Definition cairo.h:1437
@ CAIRO_COLOR_MODE_DEFAULT
Definition cairo.h:1435
@ CAIRO_COLOR_MODE_NO_COLOR
Definition cairo.h:1436
cairo_public cairo_subpixel_order_t cairo_font_options_get_subpixel_order(const cairo_font_options_t *options)
cairo_status_t(* cairo_user_scaled_font_render_glyph_func_t)(cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, cairo_text_extents_t *extents)
Definition cairo.h:1906
cairo_public void cairo_surface_unmap_image(cairo_surface_t *surface, cairo_surface_t *image)
cairo_public void cairo_font_options_destroy(cairo_font_options_t *options)
cairo_public void cairo_mesh_pattern_line_to(cairo_pattern_t *pattern, double x, double y)
cairo_public void cairo_transform(cairo_t *cr, const cairo_matrix_t *matrix)
cairo_public void cairo_mesh_pattern_set_corner_color_rgb(cairo_pattern_t *pattern, unsigned int corner_num, double red, double green, double blue)
cairo_public cairo_path_t * cairo_mesh_pattern_get_path(cairo_pattern_t *pattern, unsigned int patch_num)
cairo_public void cairo_pop_group_to_source(cairo_t *cr)
cairo_public cairo_filter_t cairo_pattern_get_filter(cairo_pattern_t *pattern)
cairo_public cairo_pattern_t * cairo_pattern_reference(cairo_pattern_t *pattern)
cairo_public void cairo_copy_page(cairo_t *cr)
enum _cairo_color_mode cairo_color_mode_t
cairo_public void cairo_set_dash(cairo_t *cr, const double *dashes, int num_dashes, double offset)
cairo_public cairo_raster_source_finish_func_t cairo_raster_source_pattern_get_finish(cairo_pattern_t *pattern)
cairo_public void * cairo_surface_get_user_data(cairo_surface_t *surface, const cairo_user_data_key_t *key)
cairo_public void cairo_destroy(cairo_t *cr)
cairo_public void cairo_clip_preserve(cairo_t *cr)
cairo_public void cairo_user_font_face_set_render_glyph_func(cairo_font_face_t *font_face, cairo_user_scaled_font_render_glyph_func_t render_glyph_func)
cairo_public cairo_t * cairo_create(cairo_surface_t *target)
cairo_public void cairo_matrix_init_identity(cairo_matrix_t *matrix)
int cairo_bool_t
Definition cairo.h:118
cairo_public void cairo_mesh_pattern_set_control_point(cairo_pattern_t *pattern, unsigned int point_num, double x, double y)
struct _cairo_rectangle_list cairo_rectangle_list_t
cairo_public cairo_device_t * cairo_surface_get_device(cairo_surface_t *surface)
void(* cairo_surface_observer_callback_t)(cairo_surface_t *observer, cairo_surface_t *target, void *data)
Definition cairo.h:2413
cairo_public void cairo_mesh_pattern_begin_patch(cairo_pattern_t *pattern)
cairo_public cairo_pattern_t * cairo_pattern_create_mesh(void)
cairo_public cairo_scaled_font_t * cairo_get_scaled_font(cairo_t *cr)
cairo_public cairo_surface_t * cairo_get_group_target(cairo_t *cr)
void(* cairo_raster_source_release_func_t)(cairo_pattern_t *pattern, void *callback_data, cairo_surface_t *surface)
Definition cairo.h:2814
cairo_public void cairo_tag_end(cairo_t *cr, const char *tag_name)
_cairo_extend
Definition cairo.h:3082
@ CAIRO_EXTEND_REFLECT
Definition cairo.h:3085
@ CAIRO_EXTEND_PAD
Definition cairo.h:3086
@ CAIRO_EXTEND_NONE
Definition cairo.h:3083
@ CAIRO_EXTEND_REPEAT
Definition cairo.h:3084
struct _cairo_pattern cairo_pattern_t
Definition cairo.h:229
cairo_public void cairo_close_path(cairo_t *cr)
cairo_public cairo_color_mode_t cairo_font_options_get_color_mode(const cairo_font_options_t *options)
cairo_public cairo_region_t * cairo_region_reference(cairo_region_t *region)
cairo_public cairo_pattern_t * cairo_pattern_create_for_surface(cairo_surface_t *surface)
cairo_public cairo_status_t cairo_set_user_data(cairo_t *cr, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
_cairo_status
Definition cairo.h:325
@ CAIRO_STATUS_NO_CURRENT_POINT
Definition cairo.h:331
@ CAIRO_STATUS_INVALID_CLUSTERS
Definition cairo.h:356
@ CAIRO_STATUS_SUCCESS
Definition cairo.h:326
@ CAIRO_STATUS_TEMP_FILE_ERROR
Definition cairo.h:350
@ CAIRO_STATUS_NULL_POINTER
Definition cairo.h:334
@ CAIRO_STATUS_INVALID_MESH_CONSTRUCTION
Definition cairo.h:363
@ CAIRO_STATUS_INVALID_CONTENT
Definition cairo.h:342
@ CAIRO_STATUS_INVALID_SIZE
Definition cairo.h:359
@ CAIRO_STATUS_SURFACE_TYPE_MISMATCH
Definition cairo.h:340
@ CAIRO_STATUS_INVALID_FORMAT
Definition cairo.h:343
@ CAIRO_STATUS_DEVICE_FINISHED
Definition cairo.h:364
@ CAIRO_STATUS_FILE_NOT_FOUND
Definition cairo.h:345
@ CAIRO_STATUS_PNG_ERROR
Definition cairo.h:366
@ CAIRO_STATUS_INVALID_SLANT
Definition cairo.h:357
@ CAIRO_STATUS_INVALID_INDEX
Definition cairo.h:348
@ CAIRO_STATUS_SVG_FONT_ERROR
Definition cairo.h:371
@ CAIRO_STATUS_JBIG2_GLOBAL_MISSING
Definition cairo.h:365
@ CAIRO_STATUS_INVALID_STATUS
Definition cairo.h:333
@ CAIRO_STATUS_INVALID_DASH
Definition cairo.h:346
@ CAIRO_STATUS_WRITE_ERROR
Definition cairo.h:338
@ CAIRO_STATUS_SURFACE_FINISHED
Definition cairo.h:339
@ CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
Definition cairo.h:360
@ CAIRO_STATUS_FREETYPE_ERROR
Definition cairo.h:367
@ CAIRO_STATUS_USER_FONT_ERROR
Definition cairo.h:354
@ CAIRO_STATUS_DEVICE_ERROR
Definition cairo.h:362
@ CAIRO_STATUS_INVALID_POP_GROUP
Definition cairo.h:330
@ CAIRO_STATUS_DEVICE_TYPE_MISMATCH
Definition cairo.h:361
@ CAIRO_STATUS_NO_MEMORY
Definition cairo.h:328
@ CAIRO_STATUS_LAST_STATUS
Definition cairo.h:373
@ CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
Definition cairo.h:349
@ CAIRO_STATUS_INVALID_RESTORE
Definition cairo.h:329
@ CAIRO_STATUS_PATTERN_TYPE_MISMATCH
Definition cairo.h:341
@ CAIRO_STATUS_INVALID_DSC_COMMENT
Definition cairo.h:347
@ CAIRO_STATUS_NEGATIVE_COUNT
Definition cairo.h:355
@ CAIRO_STATUS_INVALID_WEIGHT
Definition cairo.h:358
@ CAIRO_STATUS_READ_ERROR
Definition cairo.h:337
@ CAIRO_STATUS_WIN32_GDI_ERROR
Definition cairo.h:368
@ CAIRO_STATUS_TAG_ERROR
Definition cairo.h:369
@ CAIRO_STATUS_FONT_TYPE_MISMATCH
Definition cairo.h:352
@ CAIRO_STATUS_INVALID_VISUAL
Definition cairo.h:344
@ CAIRO_STATUS_DWRITE_ERROR
Definition cairo.h:370
@ CAIRO_STATUS_INVALID_STRING
Definition cairo.h:335
@ CAIRO_STATUS_INVALID_PATH_DATA
Definition cairo.h:336
@ CAIRO_STATUS_USER_FONT_IMMUTABLE
Definition cairo.h:353
@ CAIRO_STATUS_INVALID_STRIDE
Definition cairo.h:351
@ CAIRO_STATUS_INVALID_MATRIX
Definition cairo.h:332
cairo_public void cairo_identity_matrix(cairo_t *cr)
cairo_public cairo_hint_style_t cairo_font_options_get_hint_style(const cairo_font_options_t *options)
cairo_public void cairo_append_path(cairo_t *cr, const cairo_path_t *path)
cairo_public void cairo_surface_get_fallback_resolution(cairo_surface_t *surface, double *x_pixels_per_inch, double *y_pixels_per_inch)
cairo_public cairo_status_t cairo_surface_observer_add_fill_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public void cairo_surface_get_font_options(cairo_surface_t *surface, cairo_font_options_t *options)
enum _cairo_font_type cairo_font_type_t
cairo_public void cairo_surface_destroy(cairo_surface_t *surface)
cairo_public void cairo_rel_curve_to(cairo_t *cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
_cairo_content
Definition cairo.h:392
@ CAIRO_CONTENT_ALPHA
Definition cairo.h:394
@ CAIRO_CONTENT_COLOR_ALPHA
Definition cairo.h:395
@ CAIRO_CONTENT_COLOR
Definition cairo.h:393
cairo_public cairo_bool_t cairo_font_options_equal(const cairo_font_options_t *options, const cairo_font_options_t *other)
cairo_public void cairo_text_cluster_free(cairo_text_cluster_t *clusters)
cairo_public int cairo_region_num_rectangles(const cairo_region_t *region)
cairo_public double cairo_get_miter_limit(cairo_t *cr)
cairo_public void cairo_scaled_font_destroy(cairo_scaled_font_t *scaled_font)
cairo_public cairo_status_t cairo_surface_write_to_png(cairo_surface_t *surface, const char *filename)
cairo_public void * cairo_raster_source_pattern_get_callback_data(cairo_pattern_t *pattern)
cairo_public void cairo_matrix_transform_point(const cairo_matrix_t *matrix, double *x, double *y)
cairo_public void cairo_glyph_free(cairo_glyph_t *glyphs)
cairo_public cairo_format_t cairo_image_surface_get_format(cairo_surface_t *surface)
cairo_public cairo_status_t cairo_surface_set_user_data(cairo_surface_t *surface, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
cairo_public cairo_region_t * cairo_region_create_rectangle(const cairo_rectangle_int_t *rectangle)
cairo_public void cairo_set_font_face(cairo_t *cr, cairo_font_face_t *font_face)
cairo_public int cairo_image_surface_get_height(cairo_surface_t *surface)
enum _cairo_content cairo_content_t
enum _cairo_line_cap cairo_line_cap_t
cairo_status_t(* cairo_user_scaled_font_init_func_t)(cairo_scaled_font_t *scaled_font, cairo_t *cr, cairo_font_extents_t *extents)
Definition cairo.h:1836
cairo_public unsigned int cairo_pattern_get_reference_count(cairo_pattern_t *pattern)
cairo_public void cairo_glyph_extents(cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents)
_cairo_hint_metrics
Definition cairo.h:1411
@ CAIRO_HINT_METRICS_DEFAULT
Definition cairo.h:1412
@ CAIRO_HINT_METRICS_OFF
Definition cairo.h:1413
@ CAIRO_HINT_METRICS_ON
Definition cairo.h:1414
cairo_public void cairo_set_line_cap(cairo_t *cr, cairo_line_cap_t line_cap)
cairo_public cairo_status_t cairo_surface_observer_add_finish_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public void cairo_device_to_user(cairo_t *cr, double *x, double *y)
cairo_public void cairo_matrix_transform_distance(const cairo_matrix_t *matrix, double *dx, double *dy)
cairo_public cairo_bool_t cairo_has_current_point(cairo_t *cr)
cairo_public cairo_surface_t * cairo_image_surface_create(cairo_format_t format, int width, int height)
cairo_public cairo_font_options_t * cairo_font_options_copy(const cairo_font_options_t *original)
cairo_public void cairo_path_extents(cairo_t *cr, double *x1, double *y1, double *x2, double *y2)
cairo_public void * cairo_scaled_font_get_user_data(cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key)
cairo_public void cairo_set_line_join(cairo_t *cr, cairo_line_join_t line_join)
cairo_public cairo_rectangle_list_t * cairo_copy_clip_rectangle_list(cairo_t *cr)
cairo_public void cairo_pattern_add_color_stop_rgb(cairo_pattern_t *pattern, double offset, double red, double green, double blue)
cairo_public cairo_status_t cairo_mesh_pattern_get_control_point(cairo_pattern_t *pattern, unsigned int patch_num, unsigned int point_num, double *x, double *y)
_cairo_antialias
Definition cairo.h:758
@ CAIRO_ANTIALIAS_SUBPIXEL
Definition cairo.h:764
@ CAIRO_ANTIALIAS_DEFAULT
Definition cairo.h:759
@ CAIRO_ANTIALIAS_BEST
Definition cairo.h:769
@ CAIRO_ANTIALIAS_GOOD
Definition cairo.h:768
@ CAIRO_ANTIALIAS_FAST
Definition cairo.h:767
@ CAIRO_ANTIALIAS_NONE
Definition cairo.h:762
@ CAIRO_ANTIALIAS_GRAY
Definition cairo.h:763
cairo_public cairo_user_scaled_font_render_glyph_func_t cairo_user_font_face_get_render_glyph_func(cairo_font_face_t *font_face)
_cairo_line_cap
Definition cairo.h:828
@ CAIRO_LINE_CAP_ROUND
Definition cairo.h:830
@ CAIRO_LINE_CAP_BUTT
Definition cairo.h:829
@ CAIRO_LINE_CAP_SQUARE
Definition cairo.h:831
cairo_public void cairo_pattern_destroy(cairo_pattern_t *pattern)
cairo_public cairo_status_t cairo_surface_observer_add_flush_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public void cairo_raster_source_pattern_set_snapshot(cairo_pattern_t *pattern, cairo_raster_source_snapshot_func_t snapshot)
cairo_public cairo_status_t cairo_surface_set_mime_data(cairo_surface_t *surface, const char *mime_type, const unsigned char *data, unsigned long length, cairo_destroy_func_t destroy, void *closure)
cairo_public cairo_scaled_font_t * cairo_scaled_font_create(cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options)
cairo_public void cairo_rectangle(cairo_t *cr, double x, double y, double width, double height)
cairo_public int cairo_version(void)
#define cairo_public
Definition cairo.h:70
cairo_public cairo_bool_t cairo_region_contains_point(const cairo_region_t *region, int x, int y)
cairo_public void cairo_user_font_face_set_render_color_glyph_func(cairo_font_face_t *font_face, cairo_user_scaled_font_render_glyph_func_t render_glyph_func)
_cairo_operator
Definition cairo.h:662
@ CAIRO_OPERATOR_XOR
Definition cairo.h:677
@ CAIRO_OPERATOR_HARD_LIGHT
Definition cairo.h:688
@ CAIRO_OPERATOR_COLOR_BURN
Definition cairo.h:687
@ CAIRO_OPERATOR_DEST
Definition cairo.h:671
@ CAIRO_OPERATOR_HSL_LUMINOSITY
Definition cairo.h:695
@ CAIRO_OPERATOR_DEST_ATOP
Definition cairo.h:675
@ CAIRO_OPERATOR_SCREEN
Definition cairo.h:682
@ CAIRO_OPERATOR_IN
Definition cairo.h:667
@ CAIRO_OPERATOR_OVERLAY
Definition cairo.h:683
@ CAIRO_OPERATOR_LIGHTEN
Definition cairo.h:685
@ CAIRO_OPERATOR_HSL_HUE
Definition cairo.h:692
@ CAIRO_OPERATOR_DEST_OVER
Definition cairo.h:672
@ CAIRO_OPERATOR_DEST_IN
Definition cairo.h:673
@ CAIRO_OPERATOR_CLEAR
Definition cairo.h:663
@ CAIRO_OPERATOR_MULTIPLY
Definition cairo.h:681
@ CAIRO_OPERATOR_DARKEN
Definition cairo.h:684
@ CAIRO_OPERATOR_COLOR_DODGE
Definition cairo.h:686
@ CAIRO_OPERATOR_HSL_COLOR
Definition cairo.h:694
@ CAIRO_OPERATOR_SOFT_LIGHT
Definition cairo.h:689
@ CAIRO_OPERATOR_ADD
Definition cairo.h:678
@ CAIRO_OPERATOR_DIFFERENCE
Definition cairo.h:690
@ CAIRO_OPERATOR_SATURATE
Definition cairo.h:679
@ CAIRO_OPERATOR_EXCLUSION
Definition cairo.h:691
@ CAIRO_OPERATOR_HSL_SATURATION
Definition cairo.h:693
@ CAIRO_OPERATOR_DEST_OUT
Definition cairo.h:674
@ CAIRO_OPERATOR_ATOP
Definition cairo.h:669
@ CAIRO_OPERATOR_OUT
Definition cairo.h:668
@ CAIRO_OPERATOR_SOURCE
Definition cairo.h:665
@ CAIRO_OPERATOR_OVER
Definition cairo.h:666
cairo_public void cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
cairo_public void cairo_path_destroy(cairo_path_t *path)
cairo_public void cairo_paint(cairo_t *cr)
cairo_public void cairo_surface_mark_dirty(cairo_surface_t *surface)
cairo_public void cairo_font_options_merge(cairo_font_options_t *options, const cairo_font_options_t *other)
cairo_public void cairo_scaled_font_glyph_extents(cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents)
cairo_public void cairo_set_source(cairo_t *cr, cairo_pattern_t *source)
cairo_public void cairo_set_matrix(cairo_t *cr, const cairo_matrix_t *matrix)
cairo_public void cairo_font_face_destroy(cairo_font_face_t *font_face)
cairo_public cairo_font_face_t * cairo_scaled_font_get_font_face(cairo_scaled_font_t *scaled_font)
enum _cairo_status cairo_status_t
cairo_public cairo_status_t cairo_surface_observer_add_paint_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public cairo_pattern_type_t cairo_pattern_get_type(cairo_pattern_t *pattern)
cairo_public void cairo_user_to_device_distance(cairo_t *cr, double *dx, double *dy)
cairo_public cairo_bool_t cairo_get_hairline(cairo_t *cr)
struct _cairo_scaled_font cairo_scaled_font_t
Definition cairo.h:1113
enum _cairo_dither cairo_dither_t
cairo_public void cairo_set_font_options(cairo_t *cr, const cairo_font_options_t *options)
_cairo_font_type
Definition cairo.h:1678
@ CAIRO_FONT_TYPE_QUARTZ
Definition cairo.h:1682
@ CAIRO_FONT_TYPE_FT
Definition cairo.h:1680
@ CAIRO_FONT_TYPE_DWRITE
Definition cairo.h:1684
@ CAIRO_FONT_TYPE_USER
Definition cairo.h:1683
@ CAIRO_FONT_TYPE_TOY
Definition cairo.h:1679
@ CAIRO_FONT_TYPE_WIN32
Definition cairo.h:1681
struct _cairo_matrix cairo_matrix_t
cairo_public const char * cairo_version_string(void)
cairo_public cairo_content_t cairo_surface_get_content(cairo_surface_t *surface)
cairo_public void cairo_surface_finish(cairo_surface_t *surface)
cairo_public void cairo_debug_reset_static_data(void)
cairo_public cairo_pattern_t * cairo_pattern_create_radial(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
cairo_public void cairo_set_font_size(cairo_t *cr, double size)
cairo_public void cairo_scaled_font_get_ctm(cairo_scaled_font_t *scaled_font, cairo_matrix_t *ctm)
cairo_public cairo_pattern_t * cairo_user_scaled_font_get_foreground_marker(cairo_scaled_font_t *scaled_font)
cairo_public void cairo_set_hairline(cairo_t *cr, cairo_bool_t set_hairline)
cairo_public void cairo_matrix_init_translate(cairo_matrix_t *matrix, double tx, double ty)
cairo_public cairo_status_t cairo_surface_write_to_png_stream(cairo_surface_t *surface, cairo_write_func_t write_func, void *closure)
cairo_public void cairo_surface_mark_dirty_rectangle(cairo_surface_t *surface, int x, int y, int width, int height)
cairo_public void cairo_font_extents(cairo_t *cr, cairo_font_extents_t *extents)
cairo_public cairo_pattern_t * cairo_pattern_create_rgba(double red, double green, double blue, double alpha)
cairo_public cairo_bool_t cairo_in_stroke(cairo_t *cr, double x, double y)
void(* cairo_destroy_func_t)(void *data)
Definition cairo.h:241
cairo_public void cairo_set_operator(cairo_t *cr, cairo_operator_t op)
cairo_public void cairo_raster_source_pattern_set_copy(cairo_pattern_t *pattern, cairo_raster_source_copy_func_t copy)
cairo_public cairo_region_overlap_t cairo_region_contains_rectangle(const cairo_region_t *region, const cairo_rectangle_int_t *rectangle)
cairo_public double cairo_device_observer_elapsed(cairo_device_t *abstract_device)
cairo_public void cairo_rectangle_list_destroy(cairo_rectangle_list_t *rectangle_list)
enum _cairo_extend cairo_extend_t
cairo_public void cairo_set_font_matrix(cairo_t *cr, const cairo_matrix_t *matrix)
enum _cairo_format cairo_format_t
cairo_public cairo_region_t * cairo_region_create(void)
cairo_public cairo_font_face_t * cairo_get_font_face(cairo_t *cr)
_cairo_format
Definition cairo.h:431
@ CAIRO_FORMAT_RGB30
Definition cairo.h:438
@ CAIRO_FORMAT_A8
Definition cairo.h:435
@ CAIRO_FORMAT_RGB24
Definition cairo.h:434
@ CAIRO_FORMAT_INVALID
Definition cairo.h:432
@ CAIRO_FORMAT_ARGB32
Definition cairo.h:433
@ CAIRO_FORMAT_RGBA128F
Definition cairo.h:440
@ CAIRO_FORMAT_RGB16_565
Definition cairo.h:437
@ CAIRO_FORMAT_A1
Definition cairo.h:436
@ CAIRO_FORMAT_RGB96F
Definition cairo.h:439
cairo_status_t(* cairo_write_func_t)(void *closure, const unsigned char *data, unsigned int length)
Definition cairo.h:494
cairo_public unsigned long cairo_font_options_hash(const cairo_font_options_t *options)
cairo_public void cairo_stroke_preserve(cairo_t *cr)
cairo_public void cairo_get_font_options(cairo_t *cr, cairo_font_options_t *options)
cairo_public void cairo_raster_source_pattern_set_acquire(cairo_pattern_t *pattern, cairo_raster_source_acquire_func_t acquire, cairo_raster_source_release_func_t release)
cairo_public cairo_font_face_t * cairo_toy_font_face_create(const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight)
cairo_public void cairo_set_source_rgba(cairo_t *cr, double red, double green, double blue, double alpha)
cairo_public cairo_surface_t * cairo_get_target(cairo_t *cr)
cairo_public unsigned int cairo_device_get_reference_count(cairo_device_t *device)
cairo_public cairo_status_t cairo_pattern_get_surface(cairo_pattern_t *pattern, cairo_surface_t **surface)
cairo_public cairo_status_t cairo_region_union(cairo_region_t *dst, const cairo_region_t *other)
cairo_public void * cairo_device_get_user_data(cairo_device_t *device, const cairo_user_data_key_t *key)
cairo_public void cairo_clip(cairo_t *cr)
enum _cairo_subpixel_order cairo_subpixel_order_t
cairo_public void cairo_line_to(cairo_t *cr, double x, double y)
cairo_public void cairo_paint_with_alpha(cairo_t *cr, double alpha)
cairo_public cairo_pattern_t * cairo_pop_group(cairo_t *cr)
_cairo_text_cluster_flags
Definition cairo.h:1214
@ CAIRO_TEXT_CLUSTER_FLAG_BACKWARD
Definition cairo.h:1215
void(* cairo_raster_source_finish_func_t)(cairo_pattern_t *pattern, void *callback_data)
Definition cairo.h:2868
cairo_public cairo_font_type_t cairo_font_face_get_type(cairo_font_face_t *font_face)
cairo_public void cairo_surface_set_device_offset(cairo_surface_t *surface, double x_offset, double y_offset)
_cairo_device_type
Definition cairo.h:2308
@ CAIRO_DEVICE_TYPE_INVALID
Definition cairo.h:2318
@ CAIRO_DEVICE_TYPE_GL
Definition cairo.h:2310
@ CAIRO_DEVICE_TYPE_COGL
Definition cairo.h:2315
@ CAIRO_DEVICE_TYPE_XML
Definition cairo.h:2314
@ CAIRO_DEVICE_TYPE_WIN32
Definition cairo.h:2316
@ CAIRO_DEVICE_TYPE_SCRIPT
Definition cairo.h:2311
@ CAIRO_DEVICE_TYPE_DRM
Definition cairo.h:2309
@ CAIRO_DEVICE_TYPE_XCB
Definition cairo.h:2312
@ CAIRO_DEVICE_TYPE_XLIB
Definition cairo.h:2313
enum _cairo_hint_metrics cairo_hint_metrics_t
cairo_public cairo_status_t cairo_device_acquire(cairo_device_t *device)
cairo_public cairo_font_face_t * cairo_font_face_reference(cairo_font_face_t *font_face)
cairo_public void cairo_set_line_width(cairo_t *cr, double width)
cairo_public cairo_status_t cairo_region_subtract(cairo_region_t *dst, const cairo_region_t *other)
cairo_public void cairo_rotate(cairo_t *cr, double angle)
cairo_public void cairo_arc(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2)
cairo_public cairo_status_t cairo_region_xor_rectangle(cairo_region_t *dst, const cairo_rectangle_int_t *rectangle)
cairo_public cairo_status_t cairo_status(cairo_t *cr)
cairo_public void cairo_surface_set_fallback_resolution(cairo_surface_t *surface, double x_pixels_per_inch, double y_pixels_per_inch)
cairo_public cairo_status_t cairo_device_status(cairo_device_t *device)
cairo_public void cairo_scaled_font_extents(cairo_scaled_font_t *scaled_font, cairo_font_extents_t *extents)
cairo_public void cairo_surface_copy_page(cairo_surface_t *surface)
enum _cairo_font_weight cairo_font_weight_t
cairo_public void cairo_get_current_point(cairo_t *cr, double *x, double *y)
cairo_public void cairo_surface_show_page(cairo_surface_t *surface)
cairo_public void cairo_new_sub_path(cairo_t *cr)
cairo_public void cairo_pattern_set_extend(cairo_pattern_t *pattern, cairo_extend_t extend)
cairo_public void cairo_mesh_pattern_end_patch(cairo_pattern_t *pattern)
_cairo_hint_style
Definition cairo.h:1388
@ CAIRO_HINT_STYLE_SLIGHT
Definition cairo.h:1391
@ CAIRO_HINT_STYLE_DEFAULT
Definition cairo.h:1389
@ CAIRO_HINT_STYLE_MEDIUM
Definition cairo.h:1392
@ CAIRO_HINT_STYLE_NONE
Definition cairo.h:1390
@ CAIRO_HINT_STYLE_FULL
Definition cairo.h:1393
cairo_public cairo_pattern_t * cairo_pattern_create_linear(double x0, double y0, double x1, double y1)
cairo_public cairo_font_face_t * cairo_user_font_face_create(void)
enum _cairo_region_overlap cairo_region_overlap_t
cairo_public void cairo_pattern_set_filter(cairo_pattern_t *pattern, cairo_filter_t filter)
cairo_public cairo_font_options_t * cairo_font_options_create(void)
cairo_public double cairo_device_observer_glyphs_elapsed(cairo_device_t *abstract_device)
cairo_surface_observer_mode_t
Definition cairo.h:2394
@ CAIRO_SURFACE_OBSERVER_NORMAL
Definition cairo.h:2395
@ CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS
Definition cairo.h:2396
cairo_public void cairo_fill_preserve(cairo_t *cr)
cairo_public cairo_bool_t cairo_surface_has_show_text_glyphs(cairo_surface_t *surface)
cairo_public cairo_status_t cairo_mesh_pattern_get_patch_count(cairo_pattern_t *pattern, unsigned int *count)
cairo_public cairo_font_slant_t cairo_toy_font_face_get_slant(cairo_font_face_t *font_face)
cairo_public void cairo_select_font_face(cairo_t *cr, const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight)
cairo_public void cairo_arc_negative(cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2)
cairo_public void cairo_mesh_pattern_set_corner_color_rgba(cairo_pattern_t *pattern, unsigned int corner_num, double red, double green, double blue, double alpha)
cairo_public void cairo_set_antialias(cairo_t *cr, cairo_antialias_t antialias)
cairo_public void cairo_scale(cairo_t *cr, double sx, double sy)
cairo_public cairo_region_t * cairo_region_create_rectangles(const cairo_rectangle_int_t *rects, int count)
cairo_public void cairo_font_options_set_color_palette(cairo_font_options_t *options, unsigned int palette_index)
cairo_public cairo_pattern_t * cairo_pattern_create_rgb(double red, double green, double blue)
_cairo_dither
Definition cairo.h:462
@ CAIRO_DITHER_BEST
Definition cairo.h:467
@ CAIRO_DITHER_FAST
Definition cairo.h:465
@ CAIRO_DITHER_GOOD
Definition cairo.h:466
@ CAIRO_DITHER_NONE
Definition cairo.h:463
@ CAIRO_DITHER_DEFAULT
Definition cairo.h:464
struct _cairo_font_options cairo_font_options_t
Definition cairo.h:1462
cairo_public void cairo_glyph_path(cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
cairo_public int cairo_get_dash_count(cairo_t *cr)
cairo_public cairo_surface_type_t cairo_surface_get_type(cairo_surface_t *surface)
cairo_public cairo_status_t cairo_region_intersect_rectangle(cairo_region_t *dst, const cairo_rectangle_int_t *rectangle)
cairo_public cairo_raster_source_snapshot_func_t cairo_raster_source_pattern_get_snapshot(cairo_pattern_t *pattern)
cairo_public void cairo_device_release(cairo_device_t *device)
cairo_public cairo_status_t cairo_font_face_set_user_data(cairo_font_face_t *font_face, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
cairo_public void cairo_scaled_font_get_scale_matrix(cairo_scaled_font_t *scaled_font, cairo_matrix_t *scale_matrix)
enum _cairo_device_type cairo_device_type_t
cairo_public cairo_bool_t cairo_in_fill(cairo_t *cr, double x, double y)
cairo_public void cairo_user_font_face_set_init_func(cairo_font_face_t *font_face, cairo_user_scaled_font_init_func_t init_func)
cairo_public cairo_status_t cairo_font_options_get_custom_palette_color(cairo_font_options_t *options, unsigned int index, double *red, double *green, double *blue, double *alpha)
cairo_public cairo_user_scaled_font_unicode_to_glyph_func_t cairo_user_font_face_get_unicode_to_glyph_func(cairo_font_face_t *font_face)
struct _cairo_font_face cairo_font_face_t
Definition cairo.h:1134
cairo_public cairo_bool_t cairo_in_clip(cairo_t *cr, double x, double y)
_cairo_fill_rule
Definition cairo.h:802
@ CAIRO_FILL_RULE_EVEN_ODD
Definition cairo.h:804
@ CAIRO_FILL_RULE_WINDING
Definition cairo.h:803
cairo_public void cairo_surface_get_mime_data(cairo_surface_t *surface, const char *mime_type, const unsigned char **data, unsigned long *length)
struct _cairo_user_data_key cairo_user_data_key_t
cairo_public cairo_status_t cairo_device_set_user_data(cairo_device_t *device, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
cairo_public void cairo_push_group(cairo_t *cr)
cairo_public cairo_surface_t * cairo_surface_reference(cairo_surface_t *surface)
cairo_public cairo_surface_t * cairo_surface_map_to_image(cairo_surface_t *surface, const cairo_rectangle_int_t *extents)
cairo_public cairo_status_t cairo_pattern_get_color_stop_count(cairo_pattern_t *pattern, int *count)
cairo_public cairo_path_t * cairo_copy_path(cairo_t *cr)
cairo_public const char * cairo_font_options_get_variations(cairo_font_options_t *options)
struct _cairo_device cairo_device_t
Definition cairo.h:180
cairo_public void cairo_matrix_init_scale(cairo_matrix_t *matrix, double sx, double sy)
cairo_public void * cairo_get_user_data(cairo_t *cr, const cairo_user_data_key_t *key)
cairo_public void cairo_rel_move_to(cairo_t *cr, double dx, double dy)
cairo_public void cairo_pattern_set_dither(cairo_pattern_t *pattern, cairo_dither_t dither)
cairo_public void cairo_user_to_device(cairo_t *cr, double *x, double *y)
cairo_public void cairo_matrix_init_rotate(cairo_matrix_t *matrix, double radians)
cairo_public cairo_path_t * cairo_copy_path_flat(cairo_t *cr)
cairo_public cairo_status_t cairo_pattern_get_radial_circles(cairo_pattern_t *pattern, double *x0, double *y0, double *r0, double *x1, double *y1, double *r1)
cairo_public void cairo_font_options_set_hint_style(cairo_font_options_t *options, cairo_hint_style_t hint_style)
cairo_status_t(* cairo_raster_source_snapshot_func_t)(cairo_pattern_t *pattern, void *callback_data)
Definition cairo.h:2835
cairo_public void cairo_device_destroy(cairo_device_t *device)
cairo_public void cairo_get_matrix(cairo_t *cr, cairo_matrix_t *matrix)
cairo_public void cairo_set_tolerance(cairo_t *cr, double tolerance)
cairo_public void cairo_clip_extents(cairo_t *cr, double *x1, double *y1, double *x2, double *y2)
enum _cairo_surface_type cairo_surface_type_t
cairo_public void cairo_user_font_face_set_text_to_glyphs_func(cairo_font_face_t *font_face, cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func)
cairo_public void cairo_raster_source_pattern_get_acquire(cairo_pattern_t *pattern, cairo_raster_source_acquire_func_t *acquire, cairo_raster_source_release_func_t *release)
cairo_public cairo_pattern_t * cairo_get_source(cairo_t *cr)
cairo_public void cairo_restore(cairo_t *cr)
cairo_public void cairo_mask_surface(cairo_t *cr, cairo_surface_t *surface, double surface_x, double surface_y)
cairo_public void cairo_push_group_with_content(cairo_t *cr, cairo_content_t content)
cairo_public void cairo_reset_clip(cairo_t *cr)
cairo_public cairo_status_t cairo_region_union_rectangle(cairo_region_t *dst, const cairo_rectangle_int_t *rectangle)
cairo_public cairo_glyph_t * cairo_glyph_allocate(int num_glyphs)
cairo_public void cairo_get_font_matrix(cairo_t *cr, cairo_matrix_t *matrix)
cairo_public cairo_device_t * cairo_device_reference(cairo_device_t *device)
cairo_public cairo_bool_t cairo_surface_supports_mime_type(cairo_surface_t *surface, const char *mime_type)
cairo_public int cairo_image_surface_get_width(cairo_surface_t *surface)
cairo_public cairo_surface_t * cairo_image_surface_create_for_data(unsigned char *data, cairo_format_t format, int width, int height, int stride)
cairo_public cairo_status_t cairo_region_xor(cairo_region_t *dst, const cairo_region_t *other)
cairo_public void cairo_set_miter_limit(cairo_t *cr, double limit)
cairo_public void cairo_matrix_rotate(cairo_matrix_t *matrix, double radians)
cairo_public void cairo_surface_flush(cairo_surface_t *surface)
enum _cairo_pattern_type cairo_pattern_type_t
struct _cairo_region cairo_region_t
Definition cairo.h:3244
cairo_public cairo_status_t cairo_region_intersect(cairo_region_t *dst, const cairo_region_t *other)
cairo_public unsigned int cairo_font_options_get_color_palette(const cairo_font_options_t *options)
cairo_public cairo_antialias_t cairo_font_options_get_antialias(const cairo_font_options_t *options)
enum _cairo_text_cluster_flags cairo_text_cluster_flags_t
cairo_public cairo_pattern_t * cairo_user_scaled_font_get_foreground_source(cairo_scaled_font_t *scaled_font)
cairo_public cairo_surface_t * cairo_surface_create_observer(cairo_surface_t *target, cairo_surface_observer_mode_t mode)
cairo_public void cairo_font_options_set_hint_metrics(cairo_font_options_t *options, cairo_hint_metrics_t hint_metrics)
cairo_public void cairo_stroke_extents(cairo_t *cr, double *x1, double *y1, double *x2, double *y2)
cairo_public void cairo_mesh_pattern_curve_to(cairo_pattern_t *pattern, double x1, double y1, double x2, double y2, double x3, double y3)
cairo_public void cairo_curve_to(cairo_t *cr, double x1, double y1, double x2, double y2, double x3, double y3)
cairo_public cairo_user_scaled_font_text_to_glyphs_func_t cairo_user_font_face_get_text_to_glyphs_func(cairo_font_face_t *font_face)
cairo_public void cairo_stroke(cairo_t *cr)
cairo_public double cairo_get_tolerance(cairo_t *cr)
cairo_public void cairo_surface_get_device_scale(cairo_surface_t *surface, double *x_scale, double *y_scale)
cairo_public cairo_status_t cairo_surface_observer_add_glyphs_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public double cairo_device_observer_mask_elapsed(cairo_device_t *abstract_device)
cairo_public cairo_status_t cairo_pattern_status(cairo_pattern_t *pattern)
cairo_public cairo_surface_t * cairo_image_surface_create_from_png_stream(cairo_read_func_t read_func, void *closure)
enum _cairo_path_data_type cairo_path_data_type_t
cairo_public unsigned int cairo_font_face_get_reference_count(cairo_font_face_t *font_face)
cairo_public void cairo_font_options_set_subpixel_order(cairo_font_options_t *options, cairo_subpixel_order_t subpixel_order)
cairo_public void cairo_scaled_font_text_extents(cairo_scaled_font_t *scaled_font, const char *utf8, cairo_text_extents_t *extents)
cairo_public cairo_surface_t * cairo_surface_create_for_rectangle(cairo_surface_t *target, double x, double y, double width, double height)
cairo_public double cairo_device_observer_paint_elapsed(cairo_device_t *abstract_device)
cairo_public const char * cairo_toy_font_face_get_family(cairo_font_face_t *font_face)
enum _cairo_line_join cairo_line_join_t
cairo_public void cairo_user_font_face_set_unicode_to_glyph_func(cairo_font_face_t *font_face, cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func)
cairo_public void cairo_show_text(cairo_t *cr, const char *utf8)
cairo_public void * cairo_font_face_get_user_data(cairo_font_face_t *font_face, const cairo_user_data_key_t *key)
cairo_public cairo_antialias_t cairo_get_antialias(cairo_t *cr)
cairo_public cairo_region_t * cairo_region_copy(const cairo_region_t *original)
cairo_public unsigned int cairo_get_reference_count(cairo_t *cr)
cairo_public void cairo_scaled_font_get_font_matrix(cairo_scaled_font_t *scaled_font, cairo_matrix_t *font_matrix)
cairo_public void cairo_scaled_font_get_font_options(cairo_scaled_font_t *scaled_font, cairo_font_options_t *options)
cairo_public void cairo_pattern_set_matrix(cairo_pattern_t *pattern, const cairo_matrix_t *matrix)
cairo_public int cairo_format_stride_for_width(cairo_format_t format, int width)
cairo_public cairo_status_t cairo_device_observer_print(cairo_device_t *abstract_device, cairo_write_func_t write_func, void *closure)
_cairo_region_overlap
Definition cairo.h:3257
@ CAIRO_REGION_OVERLAP_OUT
Definition cairo.h:3259
@ CAIRO_REGION_OVERLAP_IN
Definition cairo.h:3258
@ CAIRO_REGION_OVERLAP_PART
Definition cairo.h:3260
cairo_public cairo_fill_rule_t cairo_get_fill_rule(cairo_t *cr)
cairo_public void cairo_region_destroy(cairo_region_t *region)
cairo_public void cairo_translate(cairo_t *cr, double tx, double ty)
cairo_public void cairo_get_dash(cairo_t *cr, double *dashes, double *offset)
cairo_public unsigned int cairo_surface_get_reference_count(cairo_surface_t *surface)
_cairo_path_data_type
Definition cairo.h:2138
@ CAIRO_PATH_LINE_TO
Definition cairo.h:2140
@ CAIRO_PATH_CLOSE_PATH
Definition cairo.h:2142
@ CAIRO_PATH_MOVE_TO
Definition cairo.h:2139
@ CAIRO_PATH_CURVE_TO
Definition cairo.h:2141
cairo_public cairo_status_t cairo_surface_status(cairo_surface_t *surface)
cairo_public void cairo_text_path(cairo_t *cr, const char *utf8)
cairo_public void cairo_font_options_set_variations(cairo_font_options_t *options, const char *variations)
cairo_public cairo_raster_source_copy_func_t cairo_raster_source_pattern_get_copy(cairo_pattern_t *pattern)
cairo_public void cairo_fill_extents(cairo_t *cr, double *x1, double *y1, double *x2, double *y2)
cairo_public cairo_status_t cairo_mesh_pattern_get_corner_color_rgba(cairo_pattern_t *pattern, unsigned int patch_num, unsigned int corner_num, double *red, double *green, double *blue, double *alpha)
cairo_public void cairo_surface_get_device_offset(cairo_surface_t *surface, double *x_offset, double *y_offset)
_cairo_font_weight
Definition cairo.h:1332
@ CAIRO_FONT_WEIGHT_BOLD
Definition cairo.h:1334
@ CAIRO_FONT_WEIGHT_NORMAL
Definition cairo.h:1333
cairo_public int cairo_image_surface_get_stride(cairo_surface_t *surface)
cairo_public unsigned char * cairo_image_surface_get_data(cairo_surface_t *surface)
cairo_public void cairo_set_scaled_font(cairo_t *cr, const cairo_scaled_font_t *scaled_font)
cairo_public cairo_status_t cairo_pattern_get_linear_points(cairo_pattern_t *pattern, double *x0, double *y0, double *x1, double *y1)
cairo_status_t(* cairo_raster_source_copy_func_t)(cairo_pattern_t *pattern, void *callback_data, const cairo_pattern_t *other)
Definition cairo.h:2853
cairo_public void cairo_fill(cairo_t *cr)
cairo_public void cairo_matrix_translate(cairo_matrix_t *matrix, double tx, double ty)
struct _cairo_rectangle cairo_rectangle_t
cairo_public double cairo_device_observer_fill_elapsed(cairo_device_t *abstract_device)
cairo_public void cairo_region_translate(cairo_region_t *region, int dx, int dy)
cairo_public void * cairo_pattern_get_user_data(cairo_pattern_t *pattern, const cairo_user_data_key_t *key)
cairo_public const char * cairo_status_to_string(cairo_status_t status)
cairo_public cairo_status_t cairo_region_subtract_rectangle(cairo_region_t *dst, const cairo_rectangle_int_t *rectangle)
cairo_public double cairo_surface_observer_elapsed(cairo_surface_t *abstract_surface)
cairo_public cairo_t * cairo_reference(cairo_t *cr)
cairo_public cairo_status_t cairo_scaled_font_text_to_glyphs(cairo_scaled_font_t *scaled_font, double x, double y, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *cluster_flags)
cairo_public cairo_status_t cairo_surface_observer_add_mask_callback(cairo_surface_t *abstract_surface, cairo_surface_observer_callback_t func, void *data)
cairo_public unsigned int cairo_scaled_font_get_reference_count(cairo_scaled_font_t *scaled_font)
cairo_public cairo_status_t cairo_font_face_status(cairo_font_face_t *font_face)
cairo_public void cairo_save(cairo_t *cr)
_cairo_pattern_type
Definition cairo.h:2990
@ CAIRO_PATTERN_TYPE_LINEAR
Definition cairo.h:2993
@ CAIRO_PATTERN_TYPE_SURFACE
Definition cairo.h:2992
@ CAIRO_PATTERN_TYPE_SOLID
Definition cairo.h:2991
@ CAIRO_PATTERN_TYPE_RASTER_SOURCE
Definition cairo.h:2996
@ CAIRO_PATTERN_TYPE_RADIAL
Definition cairo.h:2994
@ CAIRO_PATTERN_TYPE_MESH
Definition cairo.h:2995
cairo_public void cairo_set_fill_rule(cairo_t *cr, cairo_fill_rule_t fill_rule)
cairo_public cairo_surface_t * cairo_surface_create_similar(cairo_surface_t *other, cairo_content_t content, int width, int height)
cairo_status_t(* cairo_read_func_t)(void *closure, unsigned char *data, unsigned int length)
Definition cairo.h:516
cairo_public cairo_text_cluster_t * cairo_text_cluster_allocate(int num_clusters)
cairo_public cairo_pattern_t * cairo_pattern_create_raster_source(void *user_data, cairo_content_t content, int width, int height)
cairo_public cairo_status_t cairo_pattern_set_user_data(cairo_pattern_t *pattern, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
cairo_public cairo_bool_t cairo_region_is_empty(const cairo_region_t *region)
cairo_public void cairo_show_text_glyphs(cairo_t *cr, const char *utf8, int utf8_len, const cairo_glyph_t *glyphs, int num_glyphs, const cairo_text_cluster_t *clusters, int num_clusters, cairo_text_cluster_flags_t cluster_flags)
const char * mime_type
Definition civetweb.c:8224
guint index
json_t format(printf, 1, 2)))
double x0
Definition cairo.h:204
double xy
Definition cairo.h:203
double yx
Definition cairo.h:202
double yy
Definition cairo.h:203
double xx
Definition cairo.h:202
double y0
Definition cairo.h:204
cairo_status_t status
Definition cairo.h:1070
cairo_rectangle_t * rectangles
Definition cairo.h:1071
double height
Definition cairo.h:1055
double x
Definition cairo.h:1164
unsigned long index
Definition cairo.h:1163
double y
Definition cairo.h:1165
cairo_status_t status
Definition cairo.h:2246
int num_data
Definition cairo.h:2248
cairo_path_data_t * data
Definition cairo.h:2247
struct _cairo_path_data_t::@129 header
struct _cairo_path_data_t::@130 point
cairo_path_data_type_t type
Definition cairo.h:2216