0
|
1 module dynamin.c.cairo;
|
|
2
|
|
3 /*
|
|
4 * A complete binding to the core of
|
|
5 * the cairo graphics library version 1.3.16.
|
|
6 */
|
|
7
|
|
8 version(build) { pragma(link, cairo); }
|
|
9
|
|
10 extern(C):
|
|
11
|
|
12 int CAIRO_VERSION_ENCODE(int major, int minor, int micro) {
|
|
13 return major * 10000 + minor * 100 + micro * 1;
|
|
14 }
|
|
15
|
|
16 int cairo_version();
|
|
17
|
|
18 char* cairo_version_string();
|
|
19
|
|
20 alias int cairo_bool_t;
|
|
21
|
106
|
22 alias void cairo_t;
|
0
|
23
|
106
|
24 alias void cairo_surface_t;
|
0
|
25
|
|
26 struct cairo_matrix_t {
|
|
27 double xx; double yx;
|
|
28 double xy; double yy;
|
|
29 double x0; double y0;
|
|
30 }
|
|
31
|
106
|
32 alias void cairo_pattern_t;
|
0
|
33
|
106
|
34 alias void function(void* data) cairo_destroy_func_t;
|
0
|
35
|
|
36 struct cairo_user_data_key_t {
|
|
37 int unused;
|
|
38 }
|
|
39
|
|
40 alias int cairo_status_t;
|
|
41 enum {
|
|
42 CAIRO_STATUS_SUCCESS = 0,
|
|
43 CAIRO_STATUS_NO_MEMORY,
|
|
44 CAIRO_STATUS_INVALID_RESTORE,
|
|
45 CAIRO_STATUS_INVALID_POP_GROUP,
|
|
46 CAIRO_STATUS_NO_CURRENT_POINT,
|
|
47 CAIRO_STATUS_INVALID_MATRIX,
|
|
48 CAIRO_STATUS_INVALID_STATUS,
|
|
49 CAIRO_STATUS_NULL_POINTER,
|
|
50 CAIRO_STATUS_INVALID_STRING,
|
|
51 CAIRO_STATUS_INVALID_PATH_DATA,
|
|
52 CAIRO_STATUS_READ_ERROR,
|
|
53 CAIRO_STATUS_WRITE_ERROR,
|
|
54 CAIRO_STATUS_SURFACE_FINISHED,
|
|
55 CAIRO_STATUS_SURFACE_TYPE_MISMATCH,
|
|
56 CAIRO_STATUS_PATTERN_TYPE_MISMATCH,
|
|
57 CAIRO_STATUS_INVALID_CONTENT,
|
|
58 CAIRO_STATUS_INVALID_FORMAT,
|
|
59 CAIRO_STATUS_INVALID_VISUAL,
|
|
60 CAIRO_STATUS_FILE_NOT_FOUND,
|
|
61 CAIRO_STATUS_INVALID_DASH,
|
|
62 CAIRO_STATUS_INVALID_DSC_COMMENT,
|
|
63 CAIRO_STATUS_INVALID_INDEX,
|
|
64 CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
|
|
65 }
|
|
66
|
|
67 alias int cairo_content_t;
|
|
68 enum {
|
|
69 CAIRO_CONTENT_COLOR = 0x1000,
|
|
70 CAIRO_CONTENT_ALPHA = 0x2000,
|
|
71 CAIRO_CONTENT_COLOR_ALPHA = 0x3000
|
|
72 }
|
|
73
|
106
|
74 alias cairo_status_t function(void* closure, char* data, uint length) cairo_write_func_t;
|
0
|
75
|
106
|
76 alias cairo_status_t function(void* closure, char* data, uint length) cairo_read_func_t;
|
0
|
77
|
|
78 cairo_t* cairo_create(cairo_surface_t* target);
|
|
79
|
|
80 cairo_t* cairo_reference(cairo_t* cr);
|
|
81
|
|
82 void cairo_destroy(cairo_t* cr);
|
|
83
|
|
84 uint cairo_get_reference_count(cairo_t* cr);
|
|
85
|
|
86 void* cairo_get_user_data(cairo_t* cr, cairo_user_data_key_t* key);
|
|
87
|
|
88 cairo_status_t cairo_set_user_data(
|
|
89 cairo_t* cr,
|
|
90 cairo_user_data_key_t* key,
|
|
91 void* user_data,
|
|
92 cairo_destroy_func_t destroy);
|
|
93
|
|
94 void cairo_save(cairo_t* cr);
|
|
95
|
|
96 void cairo_restore(cairo_t* cr);
|
|
97
|
|
98 void cairo_push_group(cairo_t* cr);
|
|
99
|
|
100 void cairo_push_group_with_content(cairo_t* cr, cairo_content_t content);
|
|
101
|
|
102 cairo_pattern_t* cairo_pop_group(cairo_t* cr);
|
|
103
|
|
104 void cairo_pop_group_to_source(cairo_t* cr);
|
|
105
|
|
106 alias int cairo_operator_t;
|
|
107 enum {
|
|
108 CAIRO_OPERATOR_CLEAR,
|
|
109
|
|
110 CAIRO_OPERATOR_SOURCE,
|
|
111 CAIRO_OPERATOR_OVER,
|
|
112 CAIRO_OPERATOR_IN,
|
|
113 CAIRO_OPERATOR_OUT,
|
|
114 CAIRO_OPERATOR_ATOP,
|
|
115
|
|
116 CAIRO_OPERATOR_DEST,
|
|
117 CAIRO_OPERATOR_DEST_OVER,
|
|
118 CAIRO_OPERATOR_DEST_IN,
|
|
119 CAIRO_OPERATOR_DEST_OUT,
|
|
120 CAIRO_OPERATOR_DEST_ATOP,
|
|
121
|
|
122 CAIRO_OPERATOR_XOR,
|
|
123 CAIRO_OPERATOR_ADD,
|
|
124 CAIRO_OPERATOR_SATURATE
|
|
125 }
|
|
126
|
|
127 void cairo_set_operator(cairo_t* cr, cairo_operator_t op);
|
|
128
|
|
129 void cairo_set_source(cairo_t* cr, cairo_pattern_t* source);
|
|
130
|
|
131 void cairo_set_source_rgb(cairo_t* cr, double red, double green, double blue);
|
|
132
|
|
133 void cairo_set_source_rgba(cairo_t* cr, double red, double green, double blue, double alpha);
|
|
134
|
|
135 void cairo_set_source_surface(cairo_t* cr, cairo_surface_t* surface, double x, double y);
|
|
136
|
|
137 void cairo_set_tolerance(cairo_t* cr, double tolerance);
|
|
138
|
|
139 alias int cairo_antialias_t;
|
|
140 enum {
|
|
141 CAIRO_ANTIALIAS_DEFAULT,
|
|
142 CAIRO_ANTIALIAS_NONE,
|
|
143 CAIRO_ANTIALIAS_GRAY,
|
|
144 CAIRO_ANTIALIAS_SUBPIXEL
|
|
145 }
|
|
146
|
|
147 void cairo_set_antialias(cairo_t* cr, cairo_antialias_t antialias);
|
|
148
|
|
149 alias int cairo_fill_rule_t;
|
|
150 enum {
|
|
151 CAIRO_FILL_RULE_WINDING,
|
|
152 CAIRO_FILL_RULE_EVEN_ODD
|
|
153 }
|
|
154
|
|
155 void cairo_set_fill_rule(cairo_t* cr, cairo_fill_rule_t fill_rule);
|
|
156
|
|
157 void cairo_set_line_width(cairo_t* cr, double width);
|
|
158
|
|
159 alias int cairo_line_cap_t;
|
|
160 enum {
|
|
161 CAIRO_LINE_CAP_BUTT,
|
|
162 CAIRO_LINE_CAP_ROUND,
|
|
163 CAIRO_LINE_CAP_SQUARE
|
|
164 }
|
|
165
|
|
166 void cairo_set_line_cap(cairo_t* cr, cairo_line_cap_t line_cap);
|
|
167
|
|
168 alias int cairo_line_join_t;
|
|
169 enum {
|
|
170 CAIRO_LINE_JOIN_MITER,
|
|
171 CAIRO_LINE_JOIN_ROUND,
|
|
172 CAIRO_LINE_JOIN_BEVEL
|
|
173 }
|
|
174
|
|
175 void cairo_set_line_join(cairo_t* cr, cairo_line_join_t line_join);
|
|
176
|
|
177 void cairo_set_dash(cairo_t* cr, double* dashes, int num_dashes, double offset);
|
|
178
|
|
179 void cairo_set_miter_limit(cairo_t* cr, double limit);
|
|
180
|
|
181 void cairo_translate(cairo_t* cr, double tx, double ty);
|
|
182
|
|
183 void cairo_scale(cairo_t* cr, double sx, double sy);
|
|
184
|
|
185 void cairo_rotate(cairo_t* cr, double angle);
|
|
186
|
|
187 void cairo_transform(cairo_t* cr, cairo_matrix_t* matrix);
|
|
188
|
|
189 void cairo_set_matrix(cairo_t* cr, cairo_matrix_t* matrix);
|
|
190
|
|
191 void cairo_identity_matrix(cairo_t* cr);
|
|
192
|
|
193 void cairo_user_to_device(cairo_t* cr, double* x, double* y);
|
|
194
|
|
195 void cairo_user_to_device_distance(cairo_t* cr, double* dx, double* dy);
|
|
196
|
|
197 void cairo_device_to_user(cairo_t* cr, double* x, double* y);
|
|
198
|
|
199 void cairo_device_to_user_distance(cairo_t* cr, double* dx, double* dy);
|
|
200
|
|
201 void cairo_new_path(cairo_t* cr);
|
|
202
|
|
203 void cairo_move_to(cairo_t* cr, double x, double y);
|
|
204
|
|
205 void cairo_new_sub_path(cairo_t* cr);
|
|
206
|
|
207 void cairo_line_to(cairo_t* cr, double x, double y);
|
|
208
|
|
209 void cairo_curve_to(cairo_t* cr, double x1, double y1, double x2, double y2, double x3, double y3);
|
|
210
|
|
211 void cairo_arc(cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2);
|
|
212
|
|
213 void cairo_arc_negative(cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2);
|
|
214
|
|
215 void cairo_rel_move_to(cairo_t* cr, double dx, double dy);
|
|
216
|
|
217 void cairo_rel_line_to(cairo_t* cr, double dx, double dy);
|
|
218
|
|
219 void cairo_rel_curve_to(cairo_t* cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
|
|
220
|
|
221 void cairo_rectangle(cairo_t* cr, double x, double y, double width, double height);
|
|
222
|
|
223 void cairo_close_path(cairo_t* cr);
|
|
224
|
|
225 void cairo_paint(cairo_t* cr);
|
|
226
|
|
227 void cairo_paint_with_alpha(cairo_t* cr, double alpha);
|
|
228
|
|
229 void cairo_mask(cairo_t* cr, cairo_pattern_t* pattern);
|
|
230
|
|
231 void cairo_mask_surface(
|
|
232 cairo_t* cr,
|
|
233 cairo_surface_t* surface,
|
|
234 double surface_x, double surface_y);
|
|
235
|
|
236 void cairo_stroke(cairo_t* cr);
|
|
237
|
|
238 void cairo_stroke_preserve(cairo_t* cr);
|
|
239
|
|
240 void cairo_fill(cairo_t* cr);
|
|
241
|
|
242 void cairo_fill_preserve(cairo_t* cr);
|
|
243
|
|
244 void cairo_copy_page(cairo_t* cr);
|
|
245
|
|
246 void cairo_show_page(cairo_t* cr);
|
|
247
|
|
248 cairo_bool_t cairo_in_stroke(cairo_t* cr, double x, double y);
|
|
249
|
|
250 cairo_bool_t cairo_in_fill(cairo_t* cr, double x, double y);
|
|
251
|
|
252 void cairo_stroke_extents(
|
|
253 cairo_t* cr,
|
|
254 double* x1, double* y1,
|
|
255 double* x2, double* y2);
|
|
256
|
|
257 void cairo_fill_extents(
|
|
258 cairo_t* cr,
|
|
259 double* x1, double* y1,
|
|
260 double* x2, double* y2);
|
|
261
|
|
262 void cairo_reset_clip(cairo_t* cr);
|
|
263
|
|
264 void cairo_clip(cairo_t* cr);
|
|
265
|
|
266 void cairo_clip_preserve(cairo_t* cr);
|
|
267
|
|
268 void cairo_clip_extents(
|
|
269 cairo_t* cr,
|
|
270 double* x1, double* y1,
|
|
271 double* x2, double* y2);
|
|
272
|
|
273 struct cairo_rectangle_t {
|
|
274 double x, y, width, height;
|
|
275 }
|
|
276
|
|
277 struct cairo_rectangle_list_t {
|
|
278 cairo_status_t status;
|
|
279 cairo_rectangle_t* rectangles;
|
|
280 int num_rectangles;
|
|
281 }
|
|
282
|
|
283 cairo_rectangle_list_t* cairo_copy_clip_rectangle_list(cairo_t* cr);
|
|
284
|
|
285 void cairo_rectangle_list_destroy(cairo_rectangle_list_t* rectangle_list);
|
|
286
|
106
|
287 alias void cairo_scaled_font_t;
|
0
|
288
|
106
|
289 alias void cairo_font_face_t;
|
0
|
290
|
|
291 struct cairo_glyph_t {
|
|
292 uint index;
|
|
293 double x;
|
|
294 double y;
|
|
295 }
|
|
296
|
|
297 struct cairo_text_extents_t {
|
|
298 double x_bearing;
|
|
299 double y_bearing;
|
|
300 double width;
|
|
301 double height;
|
|
302 double x_advance;
|
|
303 double y_advance;
|
|
304 }
|
|
305
|
|
306 struct cairo_font_extents_t {
|
|
307 double ascent;
|
|
308 double descent;
|
|
309 double height;
|
|
310 double max_x_advance;
|
|
311 double max_y_advance;
|
|
312 }
|
|
313
|
|
314 alias int cairo_font_slant_t;
|
|
315 enum {
|
|
316 CAIRO_FONT_SLANT_NORMAL,
|
|
317 CAIRO_FONT_SLANT_ITALIC,
|
|
318 CAIRO_FONT_SLANT_OBLIQUE
|
|
319 }
|
|
320
|
|
321 alias int cairo_font_weight_t;
|
|
322 enum {
|
|
323 CAIRO_FONT_WEIGHT_NORMAL,
|
|
324 CAIRO_FONT_WEIGHT_BOLD
|
|
325 }
|
|
326
|
|
327 alias int cairo_subpixel_order_t;
|
|
328 enum {
|
|
329 CAIRO_SUBPIXEL_ORDER_DEFAULT,
|
|
330 CAIRO_SUBPIXEL_ORDER_RGB,
|
|
331 CAIRO_SUBPIXEL_ORDER_BGR,
|
|
332 CAIRO_SUBPIXEL_ORDER_VRGB,
|
|
333 CAIRO_SUBPIXEL_ORDER_VBGR
|
|
334 }
|
|
335
|
|
336 alias int cairo_hint_style_t;
|
|
337 enum {
|
|
338 CAIRO_HINT_STYLE_DEFAULT,
|
|
339 CAIRO_HINT_STYLE_NONE,
|
|
340 CAIRO_HINT_STYLE_SLIGHT,
|
|
341 CAIRO_HINT_STYLE_MEDIUM,
|
|
342 CAIRO_HINT_STYLE_FULL
|
|
343 }
|
|
344
|
|
345 alias int cairo_hint_metrics_t;
|
|
346 enum {
|
|
347 CAIRO_HINT_METRICS_DEFAULT,
|
|
348 CAIRO_HINT_METRICS_OFF,
|
|
349 CAIRO_HINT_METRICS_ON
|
|
350 }
|
|
351
|
106
|
352 alias void cairo_font_options_t;
|
0
|
353
|
|
354 cairo_font_options_t* cairo_font_options_create();
|
|
355
|
|
356 cairo_font_options_t* cairo_font_options_copy(cairo_font_options_t* original);
|
|
357
|
|
358 void cairo_font_options_destroy(cairo_font_options_t* options);
|
|
359
|
|
360 cairo_status_t cairo_font_options_status(cairo_font_options_t* options);
|
|
361
|
|
362 void cairo_font_options_merge(cairo_font_options_t* options, cairo_font_options_t* other);
|
|
363
|
|
364 cairo_bool_t cairo_font_options_equal(
|
|
365 cairo_font_options_t* options,
|
|
366 cairo_font_options_t* other);
|
|
367
|
|
368 uint cairo_font_options_hash(cairo_font_options_t* options);
|
|
369
|
|
370 void cairo_font_options_set_antialias(cairo_font_options_t* options, cairo_antialias_t antialias);
|
|
371
|
|
372 cairo_antialias_t cairo_font_options_get_antialias(cairo_font_options_t* options);
|
|
373
|
|
374 void cairo_font_options_set_subpixel_order(cairo_font_options_t* options, cairo_subpixel_order_t subpixel_order);
|
|
375
|
|
376 cairo_subpixel_order_t cairo_font_options_get_subpixel_order(cairo_font_options_t* options);
|
|
377
|
|
378 void cairo_font_options_set_hint_style(cairo_font_options_t* options, cairo_hint_style_t hint_style);
|
|
379
|
|
380 cairo_hint_style_t cairo_font_options_get_hint_style(cairo_font_options_t* options);
|
|
381
|
|
382 void cairo_font_options_set_hint_metrics(cairo_font_options_t* options, cairo_hint_metrics_t hint_metrics);
|
|
383
|
|
384 cairo_hint_metrics_t cairo_font_options_get_hint_metrics(cairo_font_options_t* options);
|
|
385
|
|
386 void cairo_select_font_face(
|
|
387 cairo_t* cr,
|
|
388 char* family,
|
|
389 cairo_font_slant_t slant,
|
|
390 cairo_font_weight_t weight);
|
|
391
|
|
392 void cairo_set_font_size(cairo_t* cr, double size);
|
|
393
|
|
394 void cairo_set_font_matrix(cairo_t* cr, cairo_matrix_t* matrix);
|
|
395
|
|
396 void cairo_get_font_matrix(cairo_t* cr, cairo_matrix_t* matrix);
|
|
397
|
|
398 void cairo_set_font_options(cairo_t* cr, cairo_font_options_t* options);
|
|
399
|
|
400 void cairo_get_font_options(cairo_t* cr, cairo_font_options_t* options);
|
|
401
|
|
402 void cairo_set_font_face(cairo_t* cr, cairo_font_face_t* font_face);
|
|
403
|
|
404 cairo_font_face_t* cairo_get_font_face(cairo_t* cr);
|
|
405
|
|
406 void cairo_set_scaled_font(cairo_t* cr, cairo_scaled_font_t* scaled_font);
|
|
407
|
|
408 cairo_scaled_font_t* cairo_get_scaled_font(cairo_t* cr);
|
|
409
|
|
410 void cairo_show_text(cairo_t* cr, char* utf8);
|
|
411
|
|
412 void cairo_show_glyphs(cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs);
|
|
413
|
|
414 void cairo_text_path(cairo_t* cr, char* utf8);
|
|
415
|
|
416 void cairo_glyph_path(cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs);
|
|
417
|
|
418 void cairo_text_extents(cairo_t* cr, char* utf8, cairo_text_extents_t* extents);
|
|
419
|
|
420 void cairo_glyph_extents(
|
|
421 cairo_t* cr,
|
|
422 cairo_glyph_t* glyphs, int num_glyphs,
|
|
423 cairo_text_extents_t* extents);
|
|
424
|
|
425 void cairo_font_extents(cairo_t* cr, cairo_font_extents_t* extents);
|
|
426
|
|
427 void cairo_text_path(cairo_t* cr, char* utf8);
|
|
428
|
|
429 void cairo_glyph_path(cairo_t* cr, cairo_glyph_t* glyphs, int num_glyphs);
|
|
430
|
|
431
|
|
432 cairo_font_face_t* cairo_font_face_reference(cairo_font_face_t* font_face);
|
|
433
|
|
434 void cairo_font_face_destroy(cairo_font_face_t* font_face);
|
|
435
|
|
436 uint cairo_font_face_get_reference_count(cairo_font_face_t* font_face);
|
|
437
|
|
438 cairo_status_t cairo_font_face_status(cairo_font_face_t* font_face);
|
|
439
|
|
440 alias int cairo_font_type_t;
|
|
441 enum {
|
|
442 CAIRO_FONT_TYPE_TOY,
|
|
443 CAIRO_FONT_TYPE_FT,
|
|
444 CAIRO_FONT_TYPE_WIN32,
|
|
445 CAIRO_FONT_TYPE_ATSUI
|
|
446 }
|
|
447
|
|
448 cairo_font_type_t cairo_font_face_get_type(cairo_font_face_t* font_face);
|
|
449
|
|
450 void* cairo_font_face_get_user_data(
|
|
451 cairo_font_face_t* font_face,
|
|
452 cairo_user_data_key_t* key);
|
|
453
|
|
454 cairo_status_t cairo_font_face_set_user_data(
|
|
455 cairo_font_face_t* font_face,
|
|
456 cairo_user_data_key_t* key,
|
|
457 void* user_data,
|
|
458 cairo_destroy_func_t destroy);
|
|
459
|
|
460 cairo_scaled_font_t* cairo_scaled_font_create(
|
|
461 cairo_font_face_t* font_face,
|
|
462 cairo_matrix_t* font_matrix,
|
|
463 cairo_matrix_t* ctm,
|
|
464 cairo_font_options_t* options);
|
|
465
|
|
466 cairo_scaled_font_t* cairo_scaled_font_reference(
|
|
467 cairo_scaled_font_t* scaled_font);
|
|
468
|
|
469 void cairo_scaled_font_destroy(cairo_scaled_font_t* scaled_font);
|
|
470
|
|
471 uint cairo_scaled_font_get_reference_count(cairo_scaled_font_t* scaled_font);
|
|
472
|
|
473 cairo_status_t cairo_scaled_font_status(cairo_scaled_font_t* scaled_font);
|
|
474
|
|
475 cairo_font_type_t cairo_scaled_font_get_type(cairo_scaled_font_t* scaled_font);
|
|
476
|
|
477 void* cairo_scaled_font_get_user_data(
|
|
478 cairo_scaled_font_t* scaled_font,
|
|
479 cairo_user_data_key_t* key);
|
|
480
|
|
481 cairo_status_t cairo_scaled_font_set_user_data(
|
|
482 cairo_scaled_font_t* scaled_font,
|
|
483 cairo_user_data_key_t* key,
|
|
484 void* user_data,
|
|
485 cairo_destroy_func_t destroy);
|
|
486
|
|
487 void cairo_scaled_font_extents(cairo_scaled_font_t* scaled_font, cairo_font_extents_t* extents);
|
|
488
|
|
489 void cairo_scaled_font_text_extents(
|
|
490 cairo_scaled_font_t* scaled_font,
|
|
491 char* utf8,
|
|
492 cairo_text_extents_t* extents);
|
|
493
|
|
494 void cairo_scaled_font_glyph_extents(
|
|
495 cairo_scaled_font_t* scaled_font,
|
|
496 cairo_glyph_t* glyphs, int num_glyphs,
|
|
497 cairo_text_extents_t* extents);
|
|
498
|
|
499 cairo_font_face_t* cairo_scaled_font_get_font_face(cairo_scaled_font_t* scaled_font);
|
|
500
|
|
501 void cairo_scaled_font_get_font_matrix(
|
|
502 cairo_scaled_font_t* scaled_font,
|
|
503 cairo_matrix_t* font_matrix);
|
|
504
|
|
505 void cairo_scaled_font_get_ctm(
|
|
506 cairo_scaled_font_t* scaled_font,
|
|
507 cairo_matrix_t* ctm);
|
|
508
|
|
509 void cairo_scaled_font_get_font_options(
|
|
510 cairo_scaled_font_t* scaled_font,
|
|
511 cairo_font_options_t* options);
|
|
512
|
|
513
|
|
514 cairo_operator_t cairo_get_operator(cairo_t* cr);
|
|
515
|
|
516 cairo_pattern_t* cairo_get_source(cairo_t* cr);
|
|
517
|
|
518 double cairo_get_tolerance(cairo_t* cr);
|
|
519
|
|
520 cairo_antialias_t cairo_get_antialias(cairo_t* cr);
|
|
521
|
|
522 void cairo_get_current_point(cairo_t* cr, double* x, double* y);
|
|
523
|
|
524 cairo_fill_rule_t cairo_get_fill_rule(cairo_t* cr);
|
|
525
|
|
526 double cairo_get_line_width(cairo_t* cr);
|
|
527
|
|
528 cairo_line_cap_t cairo_get_line_cap(cairo_t* cr);
|
|
529
|
|
530 cairo_line_join_t cairo_get_line_join(cairo_t* cr);
|
|
531
|
|
532 double cairo_get_miter_limit(cairo_t* cr);
|
|
533
|
|
534 int cairo_get_dash_count(cairo_t* cr);
|
|
535
|
|
536 void cairo_get_dash(cairo_t* cr, double* dashes, double* offset);
|
|
537
|
|
538 void cairo_get_matrix(cairo_t* cr, cairo_matrix_t* matrix);
|
|
539
|
|
540 cairo_surface_t* cairo_get_target(cairo_t* cr);
|
|
541
|
|
542 cairo_surface_t* cairo_get_group_target(cairo_t* cr);
|
|
543
|
|
544 alias int cairo_path_data_type_t;
|
|
545 enum {
|
|
546 CAIRO_PATH_MOVE_TO,
|
|
547 CAIRO_PATH_LINE_TO,
|
|
548 CAIRO_PATH_CURVE_TO,
|
|
549 CAIRO_PATH_CLOSE_PATH
|
|
550 }
|
|
551
|
|
552 union cairo_path_data_t {
|
|
553 struct _header {
|
|
554 cairo_path_data_type_t type;
|
|
555 int length;
|
|
556 }
|
|
557 struct _point {
|
|
558 double x, y;
|
|
559 }
|
|
560 _header header;
|
|
561 _point point;
|
|
562 }
|
|
563
|
|
564 struct cairo_path_t {
|
|
565 cairo_status_t status;
|
|
566 cairo_path_data_t* data;
|
|
567 int num_data;
|
|
568 }
|
|
569
|
|
570 cairo_path_t* cairo_copy_path(cairo_t* cr);
|
|
571
|
|
572 cairo_path_t* cairo_copy_path_flat(cairo_t* cr);
|
|
573
|
|
574 void cairo_append_path(cairo_t* cr, cairo_path_t* path);
|
|
575
|
|
576 void cairo_path_destroy(cairo_path_t* path);
|
|
577
|
|
578 cairo_status_t cairo_status(cairo_t* cr);
|
|
579
|
|
580 char* cairo_status_to_string(cairo_status_t status);
|
|
581
|
|
582
|
|
583 cairo_surface_t* cairo_surface_create_similar(
|
|
584 cairo_surface_t* other,
|
|
585 cairo_content_t content,
|
|
586 int width, int height);
|
|
587
|
|
588 cairo_surface_t* cairo_surface_reference(cairo_surface_t* surface);
|
|
589
|
|
590 void cairo_surface_finish(cairo_surface_t* surface);
|
|
591
|
|
592 void cairo_surface_destroy(cairo_surface_t* surface);
|
|
593
|
|
594 uint cairo_surface_get_reference_count(cairo_surface_t* surface);
|
|
595
|
|
596 cairo_status_t cairo_surface_status(cairo_surface_t* surface);
|
|
597
|
|
598 alias int cairo_surface_type_t;
|
|
599 enum {
|
|
600 CAIRO_SURFACE_TYPE_IMAGE,
|
|
601 CAIRO_SURFACE_TYPE_PDF,
|
|
602 CAIRO_SURFACE_TYPE_PS,
|
|
603 CAIRO_SURFACE_TYPE_XLIB,
|
|
604 CAIRO_SURFACE_TYPE_XCB,
|
|
605 CAIRO_SURFACE_TYPE_GLITZ,
|
|
606 CAIRO_SURFACE_TYPE_QUARTZ,
|
|
607 CAIRO_SURFACE_TYPE_WIN32,
|
|
608 CAIRO_SURFACE_TYPE_BEOS,
|
|
609 CAIRO_SURFACE_TYPE_DIRECTFB,
|
|
610 CAIRO_SURFACE_TYPE_SVG,
|
|
611 CAIRO_SURFACE_TYPE_OS2
|
|
612 }
|
|
613
|
|
614 cairo_surface_type_t cairo_surface_get_type(cairo_surface_t* surface);
|
|
615
|
|
616 cairo_content_t cairo_surface_get_content(cairo_surface_t* surface);
|
|
617
|
|
618 void* cairo_surface_get_user_data(
|
|
619 cairo_surface_t* surface,
|
|
620 cairo_user_data_key_t* key);
|
|
621
|
|
622 cairo_status_t cairo_surface_set_user_data(
|
|
623 cairo_surface_t* surface,
|
|
624 cairo_user_data_key_t* key,
|
|
625 void* user_data,
|
|
626 cairo_destroy_func_t destroy);
|
|
627
|
|
628 void cairo_surface_get_font_options(cairo_surface_t* surface, cairo_font_options_t* options);
|
|
629
|
|
630 void cairo_surface_flush(cairo_surface_t* surface);
|
|
631
|
|
632 void cairo_surface_mark_dirty(cairo_surface_t* surface);
|
|
633
|
|
634 void cairo_surface_mark_dirty_rectangle(cairo_surface_t* surface, int x, int y, int width, int height);
|
|
635
|
|
636 void cairo_surface_set_device_offset(cairo_surface_t* surface, double x_offset, double y_offset);
|
|
637
|
|
638 void cairo_surface_get_device_offset(
|
|
639 cairo_surface_t* surface,
|
|
640 double* x_offset, double* y_offset);
|
|
641
|
|
642 void cairo_surface_set_fallback_resolution(
|
|
643 cairo_surface_t* surface,
|
|
644 double x_pixels_per_inch, double y_pixels_per_inch);
|
|
645
|
|
646 alias int cairo_format_t;
|
|
647 enum {
|
|
648 CAIRO_FORMAT_ARGB32,
|
|
649 CAIRO_FORMAT_RGB24,
|
|
650 CAIRO_FORMAT_A8,
|
|
651 CAIRO_FORMAT_A1
|
|
652 }
|
|
653
|
|
654 cairo_surface_t* cairo_image_surface_create(cairo_format_t format, int width, int height);
|
|
655
|
|
656 cairo_surface_t* cairo_image_surface_create_for_data(
|
|
657 char* data,
|
|
658 cairo_format_t format,
|
|
659 int width, int height, int stride);
|
|
660
|
|
661 char* cairo_image_surface_get_data(cairo_surface_t* surface);
|
|
662
|
|
663 cairo_format_t cairo_image_surface_get_format(cairo_surface_t* surface);
|
|
664
|
|
665 int cairo_image_surface_get_width(cairo_surface_t* surface);
|
|
666
|
|
667 int cairo_image_surface_get_height(cairo_surface_t* surface);
|
|
668
|
|
669 int cairo_image_surface_get_stride(cairo_surface_t* surface);
|
|
670
|
|
671
|
|
672 cairo_pattern_t* cairo_pattern_create_rgb(double red, double green, double blue);
|
|
673
|
|
674 cairo_pattern_t* cairo_pattern_create_rgba(double red, double green, double blue, double alpha);
|
|
675
|
|
676 cairo_pattern_t* cairo_pattern_create_for_surface(cairo_surface_t* surface);
|
|
677
|
|
678 cairo_pattern_t* cairo_pattern_create_linear(double x0, double y0, double x1, double y1);
|
|
679
|
|
680 cairo_pattern_t* cairo_pattern_create_radial(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1);
|
|
681
|
|
682 cairo_pattern_t* cairo_pattern_reference(cairo_pattern_t* pattern);
|
|
683
|
|
684 void cairo_pattern_destroy(cairo_pattern_t* pattern);
|
|
685
|
|
686 uint cairo_pattern_get_reference_count(cairo_pattern_t* pattern);
|
|
687
|
|
688 cairo_status_t cairo_pattern_status(cairo_pattern_t* pattern);
|
|
689
|
|
690 void* cairo_pattern_get_user_data(
|
|
691 cairo_pattern_t* pattern,
|
|
692 cairo_user_data_key_t* key);
|
|
693
|
|
694 cairo_status_t cairo_pattern_set_user_data(
|
|
695 cairo_pattern_t* pattern,
|
|
696 cairo_user_data_key_t* key,
|
|
697 void* user_data,
|
|
698 cairo_destroy_func_t destroy);
|
|
699
|
|
700 alias int cairo_pattern_type_t;
|
|
701 enum {
|
|
702 CAIRO_PATTERN_TYPE_SOLID,
|
|
703 CAIRO_PATTERN_TYPE_SURFACE,
|
|
704 CAIRO_PATTERN_TYPE_LINEAR,
|
|
705 CAIRO_PATTERN_TYPE_RADIAL
|
|
706 }
|
|
707
|
|
708 cairo_pattern_type_t cairo_pattern_get_type(cairo_pattern_t* pattern);
|
|
709
|
|
710 void cairo_pattern_add_color_stop_rgb(
|
|
711 cairo_pattern_t* pattern, double offset,
|
|
712 double red, double green, double blue);
|
|
713
|
|
714 void cairo_pattern_add_color_stop_rgba(
|
|
715 cairo_pattern_t* pattern, double offset,
|
|
716 double red, double green, double blue, double alpha);
|
|
717
|
|
718 void cairo_pattern_set_matrix(cairo_pattern_t* pattern, cairo_matrix_t* matrix);
|
|
719
|
|
720 void cairo_pattern_get_matrix(cairo_pattern_t* pattern, cairo_matrix_t* matrix);
|
|
721
|
|
722 alias int cairo_extend_t;
|
|
723 enum {
|
|
724 CAIRO_EXTEND_NONE,
|
|
725 CAIRO_EXTEND_REPEAT,
|
|
726 CAIRO_EXTEND_REFLECT,
|
|
727 CAIRO_EXTEND_PAD
|
|
728 }
|
|
729
|
|
730 void cairo_pattern_set_extend(cairo_pattern_t* pattern, cairo_extend_t extend);
|
|
731
|
|
732 cairo_extend_t cairo_pattern_get_extend(cairo_pattern_t* pattern);
|
|
733
|
|
734 alias int cairo_filter_t;
|
|
735 enum {
|
|
736 CAIRO_FILTER_FAST,
|
|
737 CAIRO_FILTER_GOOD,
|
|
738 CAIRO_FILTER_BEST,
|
|
739 CAIRO_FILTER_NEAREST,
|
|
740 CAIRO_FILTER_BILINEAR,
|
|
741 CAIRO_FILTER_GAUSSIAN
|
|
742 }
|
|
743
|
|
744 void cairo_pattern_set_filter(cairo_pattern_t* pattern, cairo_filter_t filter);
|
|
745
|
|
746 cairo_filter_t cairo_pattern_get_filter(cairo_pattern_t* pattern);
|
|
747
|
|
748 cairo_status_t cairo_pattern_get_rgba(
|
|
749 cairo_pattern_t* pattern,
|
|
750 double* red, double* green,
|
|
751 double* blue, double* alpha);
|
|
752
|
|
753 cairo_status_t cairo_pattern_get_surface(
|
|
754 cairo_pattern_t* pattern,
|
|
755 cairo_surface_t** surface);
|
|
756
|
|
757 cairo_status_t cairo_pattern_get_color_stop_rgba(
|
|
758 cairo_pattern_t* pattern,
|
|
759 int index, double* offset,
|
|
760 double* red, double* green,
|
|
761 double* blue, double* alpha);
|
|
762
|
|
763 cairo_status_t cairo_pattern_get_color_stop_count(
|
|
764 cairo_pattern_t* pattern,
|
|
765 int* count);
|
|
766
|
|
767 cairo_status_t cairo_pattern_get_linear_points(
|
|
768 cairo_pattern_t* pattern,
|
|
769 double* x0, double* y0,
|
|
770 double* x1, double* y1);
|
|
771
|
|
772 cairo_status_t cairo_pattern_get_radial_circles(
|
|
773 cairo_pattern_t* pattern,
|
|
774 double* x0, double* y0, double* r0,
|
|
775 double* x1, double* y1, double* r1);
|
|
776
|
|
777
|
|
778 void cairo_matrix_init(cairo_matrix_t* matrix, double xx, double yx, double xy, double yy, double x0, double y0);
|
|
779
|
|
780 void cairo_matrix_init_identity(cairo_matrix_t* matrix);
|
|
781
|
|
782 void cairo_matrix_init_translate(cairo_matrix_t* matrix, double tx, double ty);
|
|
783
|
|
784 void cairo_matrix_init_scale(cairo_matrix_t* matrix, double sx, double sy);
|
|
785
|
|
786 void cairo_matrix_init_rotate(cairo_matrix_t* matrix, double radians);
|
|
787
|
|
788 void cairo_matrix_translate(cairo_matrix_t* matrix, double tx, double ty);
|
|
789
|
|
790 void cairo_matrix_scale(cairo_matrix_t* matrix, double sx, double sy);
|
|
791
|
|
792 void cairo_matrix_rotate(cairo_matrix_t* matrix, double radians);
|
|
793
|
|
794 cairo_status_t cairo_matrix_invert(cairo_matrix_t* matrix);
|
|
795
|
|
796 void cairo_matrix_multiply(cairo_matrix_t* result, cairo_matrix_t* a, cairo_matrix_t* b);
|
|
797
|
|
798 void cairo_matrix_transform_distance(cairo_matrix_t* matrix, double* dx, double* dy);
|
|
799
|
|
800 void cairo_matrix_transform_point(cairo_matrix_t* matrix, double* x, double* y);
|
|
801
|
|
802 void cairo_debug_reset_static_data();
|
|
803
|