1 // Take a look at the license at the top of the repository in the LICENSE file. 2 3 #![allow(non_camel_case_types)] 4 #![allow(clippy::unreadable_literal)] 5 #![allow(clippy::write_literal)] 6 #![allow(clippy::upper_case_acronyms)] 7 8 extern crate libc; 9 10 #[cfg(feature = "use_glib")] 11 extern crate glib_sys as glib_ffi; 12 13 #[cfg(any(feature = "xlib", feature = "dox"))] 14 extern crate x11; 15 16 #[cfg(all(windows, feature = "win32-surface"))] 17 extern crate winapi as winapi_orig; 18 19 #[cfg(all(windows, feature = "win32-surface"))] 20 pub mod winapi { 21 pub use winapi_orig::shared::windef::HDC; 22 } 23 24 #[cfg(all(feature = "dox", not(all(windows, feature = "win32-surface"))))] 25 pub mod winapi { 26 use libc::c_void; 27 28 #[repr(C)] 29 pub struct HDC(c_void); 30 } 31 32 use libc::{c_char, c_double, c_int, c_uchar, c_uint, c_ulong, c_void}; 33 34 #[cfg(any(feature = "xlib", feature = "dox"))] 35 use x11::xlib; 36 37 pub type cairo_antialias_t = c_int; 38 pub type cairo_content_t = c_int; 39 pub type cairo_device_type_t = c_int; 40 pub type cairo_extend_t = c_int; 41 pub type cairo_fill_rule_t = c_int; 42 pub type cairo_filter_t = c_int; 43 pub type cairo_font_slant_t = c_int; 44 pub type cairo_font_type_t = c_int; 45 pub type cairo_font_weight_t = c_int; 46 pub type cairo_format_t = c_int; 47 pub type cairo_ft_synthesize_t = c_uint; 48 pub type cairo_hint_metrics_t = c_int; 49 pub type cairo_hint_style_t = c_int; 50 pub type cairo_line_cap_t = c_int; 51 pub type cairo_line_join_t = c_int; 52 pub type cairo_operator_t = c_int; 53 pub type cairo_pattern_type_t = c_int; 54 pub type cairo_path_data_type_t = c_int; 55 pub type cairo_region_overlap_t = c_int; 56 #[cfg(any(feature = "script", feature = "dox"))] 57 pub type cairo_script_mode_t = c_int; 58 pub type cairo_status_t = c_int; 59 pub type cairo_subpixel_order_t = c_int; 60 pub type cairo_surface_type_t = c_int; 61 #[cfg(any(all(feature = "svg", feature = "v1_16"), feature = "dox"))] 62 pub type cairo_svg_unit_t = c_int; 63 pub type cairo_text_cluster_flags_t = c_int; 64 65 #[cfg(any(all(feature = "pdf", feature = "v1_16"), feature = "dox"))] 66 pub type cairo_pdf_outline_flags_t = c_int; 67 #[cfg(any(all(feature = "pdf", feature = "v1_16"), feature = "dox"))] 68 pub type cairo_pdf_metadata_t = c_int; 69 #[cfg(any(feature = "pdf", feature = "dox"))] 70 pub type cairo_pdf_version_t = c_int; 71 #[cfg(any(feature = "svg", feature = "dox"))] 72 pub type cairo_svg_version_t = c_int; 73 #[cfg(any(feature = "ps", feature = "dox"))] 74 pub type cairo_ps_level_t = c_int; 75 76 pub type cairo_mesh_corner_t = c_uint; 77 78 macro_rules! debug_impl { 79 ($name:ty) => { 80 impl ::std::fmt::Debug for $name { 81 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 82 write!(f, "{} @ {:?}", stringify!($name), self as *const _) 83 } 84 } 85 }; 86 } 87 88 #[repr(C)] 89 pub struct cairo_t(c_void); 90 debug_impl!(cairo_t); 91 92 #[repr(C)] 93 pub struct cairo_surface_t(c_void); 94 debug_impl!(cairo_surface_t); 95 96 #[repr(C)] 97 pub struct cairo_device_t(c_void); 98 debug_impl!(cairo_device_t); 99 100 #[repr(C)] 101 pub struct cairo_pattern_t(c_void); 102 103 #[cfg(any(feature = "xcb", feature = "dox"))] 104 #[repr(C)] 105 pub struct xcb_connection_t(c_void); 106 #[cfg(any(feature = "xcb", feature = "dox"))] 107 debug_impl!(xcb_connection_t); 108 109 #[cfg(any(feature = "xcb", feature = "dox"))] 110 pub type xcb_drawable_t = u32; 111 112 #[cfg(any(feature = "xcb", feature = "dox"))] 113 pub type xcb_pixmap_t = u32; 114 115 #[cfg(any(feature = "xcb", feature = "dox"))] 116 #[repr(C)] 117 pub struct xcb_visualtype_t(c_void); 118 #[cfg(any(feature = "xcb", feature = "dox"))] 119 debug_impl!(xcb_visualtype_t); 120 121 #[cfg(any(feature = "xcb", feature = "dox"))] 122 #[repr(C)] 123 pub struct xcb_screen_t(c_void); 124 #[cfg(any(feature = "xcb", feature = "dox"))] 125 debug_impl!(xcb_screen_t); 126 127 #[cfg(any(feature = "xcb", feature = "dox"))] 128 #[repr(C)] 129 pub struct xcb_render_pictforminfo_t(c_void); 130 #[cfg(any(feature = "xcb", feature = "dox"))] 131 debug_impl!(xcb_render_pictforminfo_t); 132 133 #[repr(C)] 134 #[derive(Clone, Copy, Debug, PartialEq)] 135 pub struct cairo_rectangle_t { 136 pub x: f64, 137 pub y: f64, 138 pub width: f64, 139 pub height: f64, 140 } 141 #[repr(C)] 142 #[derive(Clone, Copy, Debug, Eq, PartialEq)] 143 pub struct cairo_rectangle_int_t { 144 pub x: i32, 145 pub y: i32, 146 pub width: i32, 147 pub height: i32, 148 } 149 #[repr(C)] 150 #[derive(Debug, Clone, Copy)] 151 pub struct cairo_rectangle_list_t { 152 pub status: cairo_status_t, 153 pub rectangles: *mut cairo_rectangle_t, 154 pub num_rectangles: c_int, 155 } 156 #[repr(C)] 157 #[derive(Debug, Clone, Copy)] 158 pub struct cairo_path_t { 159 pub status: cairo_status_t, 160 pub data: *mut cairo_path_data, 161 pub num_data: c_int, 162 } 163 #[repr(C)] 164 #[derive(Debug, Clone, Copy)] 165 pub struct cairo_path_data_header { 166 pub data_type: cairo_path_data_type_t, 167 pub length: c_int, 168 } 169 #[repr(C)] 170 #[derive(Clone, Copy)] 171 pub union cairo_path_data { 172 pub header: cairo_path_data_header, 173 pub point: [f64; 2], 174 } 175 #[repr(C)] 176 pub struct cairo_glyph_t(c_void); 177 debug_impl!(cairo_glyph_t); 178 179 #[repr(C)] 180 pub struct cairo_region_t(c_void); 181 debug_impl!(cairo_region_t); 182 183 #[repr(C)] 184 pub struct cairo_font_face_t(c_void); 185 debug_impl!(cairo_font_face_t); 186 187 #[repr(C)] 188 pub struct cairo_scaled_font_t(c_void); 189 debug_impl!(cairo_scaled_font_t); 190 191 #[repr(C)] 192 pub struct cairo_font_options_t(c_void); 193 debug_impl!(cairo_font_options_t); 194 195 #[repr(C)] 196 #[derive(Clone, Copy, Debug)] 197 pub struct FontExtents { 198 pub ascent: c_double, 199 pub descent: c_double, 200 pub height: c_double, 201 pub max_x_advance: c_double, 202 pub max_y_advance: c_double, 203 } 204 #[repr(C)] 205 #[derive(Clone, Copy, Debug)] 206 pub struct Glyph { 207 pub index: c_ulong, 208 pub x: c_double, 209 pub y: c_double, 210 } 211 #[repr(C)] 212 #[derive(Clone, Copy, Debug)] 213 pub struct TextCluster { 214 pub num_bytes: c_int, 215 pub num_glyphs: c_int, 216 } 217 #[repr(C)] 218 #[derive(Clone, Copy, Debug)] 219 pub struct TextExtents { 220 pub x_bearing: c_double, 221 pub y_bearing: c_double, 222 pub width: c_double, 223 pub height: c_double, 224 pub x_advance: c_double, 225 pub y_advance: c_double, 226 } 227 #[repr(C)] 228 #[derive(Debug, Clone, Copy, PartialEq)] 229 pub struct Matrix { 230 pub xx: c_double, 231 pub yx: c_double, 232 233 pub xy: c_double, 234 pub yy: c_double, 235 236 pub x0: c_double, 237 pub y0: c_double, 238 } 239 240 impl ::std::fmt::Display for Matrix { fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result241 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { 242 write!(f, "Matrix") 243 } 244 } 245 246 #[repr(C)] 247 #[derive(Clone, Copy, Default, Debug)] 248 pub struct cairo_user_data_key_t { 249 pub unused: c_int, 250 } 251 #[repr(C)] 252 #[derive(Debug, Clone, Copy)] 253 pub struct cairo_bool_t { 254 value: c_int, 255 } 256 257 impl cairo_bool_t { as_bool(self) -> bool258 pub fn as_bool(self) -> bool { 259 self.value != 0 260 } 261 } 262 263 impl From<bool> for cairo_bool_t { from(b: bool) -> cairo_bool_t264 fn from(b: bool) -> cairo_bool_t { 265 let value = if b { 1 } else { 0 }; 266 cairo_bool_t { value } 267 } 268 } 269 270 pub type CGContextRef = *mut c_void; 271 272 pub type cairo_destroy_func_t = Option<unsafe extern "C" fn(*mut c_void)>; 273 pub type cairo_read_func_t = 274 Option<unsafe extern "C" fn(*mut c_void, *mut c_uchar, c_uint) -> cairo_status_t>; 275 pub type cairo_write_func_t = 276 Option<unsafe extern "C" fn(*mut c_void, *mut c_uchar, c_uint) -> cairo_status_t>; 277 278 #[cfg(any(feature = "freetype", feature = "dox"))] 279 pub type FT_Face = *mut c_void; 280 #[cfg(any(feature = "freetype", feature = "dox"))] 281 pub type FcPattern = c_void; 282 283 extern "C" { cairo_create(target: *mut cairo_surface_t) -> *mut cairo_t284 pub fn cairo_create(target: *mut cairo_surface_t) -> *mut cairo_t; cairo_reference(cr: *mut cairo_t) -> *mut cairo_t285 pub fn cairo_reference(cr: *mut cairo_t) -> *mut cairo_t; cairo_destroy(cr: *mut cairo_t)286 pub fn cairo_destroy(cr: *mut cairo_t); cairo_status(cr: *mut cairo_t) -> cairo_status_t287 pub fn cairo_status(cr: *mut cairo_t) -> cairo_status_t; cairo_save(cr: *mut cairo_t)288 pub fn cairo_save(cr: *mut cairo_t); cairo_restore(cr: *mut cairo_t)289 pub fn cairo_restore(cr: *mut cairo_t); cairo_get_target(cr: *mut cairo_t) -> *mut cairo_surface_t290 pub fn cairo_get_target(cr: *mut cairo_t) -> *mut cairo_surface_t; cairo_push_group(cr: *mut cairo_t)291 pub fn cairo_push_group(cr: *mut cairo_t); cairo_push_group_with_content(cr: *mut cairo_t, content: cairo_content_t)292 pub fn cairo_push_group_with_content(cr: *mut cairo_t, content: cairo_content_t); cairo_pop_group(cr: *mut cairo_t) -> *mut cairo_pattern_t293 pub fn cairo_pop_group(cr: *mut cairo_t) -> *mut cairo_pattern_t; cairo_pop_group_to_source(cr: *mut cairo_t)294 pub fn cairo_pop_group_to_source(cr: *mut cairo_t); cairo_get_group_target(cr: *mut cairo_t) -> *mut cairo_surface_t295 pub fn cairo_get_group_target(cr: *mut cairo_t) -> *mut cairo_surface_t; cairo_set_source_rgb(cr: *mut cairo_t, red: c_double, green: c_double, blue: c_double)296 pub fn cairo_set_source_rgb(cr: *mut cairo_t, red: c_double, green: c_double, blue: c_double); cairo_set_source_rgba( cr: *mut cairo_t, red: c_double, green: c_double, blue: c_double, alpha: c_double, )297 pub fn cairo_set_source_rgba( 298 cr: *mut cairo_t, 299 red: c_double, 300 green: c_double, 301 blue: c_double, 302 alpha: c_double, 303 ); cairo_set_source(cr: *mut cairo_t, source: *mut cairo_pattern_t)304 pub fn cairo_set_source(cr: *mut cairo_t, source: *mut cairo_pattern_t); cairo_set_source_surface( cr: *mut cairo_t, surface: *mut cairo_surface_t, x: c_double, y: c_double, )305 pub fn cairo_set_source_surface( 306 cr: *mut cairo_t, 307 surface: *mut cairo_surface_t, 308 x: c_double, 309 y: c_double, 310 ); cairo_get_source(cr: *mut cairo_t) -> *mut cairo_pattern_t311 pub fn cairo_get_source(cr: *mut cairo_t) -> *mut cairo_pattern_t; cairo_set_antialias(cr: *mut cairo_t, antialias: cairo_antialias_t)312 pub fn cairo_set_antialias(cr: *mut cairo_t, antialias: cairo_antialias_t); cairo_get_antialias(cr: *mut cairo_t) -> cairo_antialias_t313 pub fn cairo_get_antialias(cr: *mut cairo_t) -> cairo_antialias_t; cairo_set_dash( cr: *mut cairo_t, dashes: *const c_double, num_dashes: c_int, offset: c_double, )314 pub fn cairo_set_dash( 315 cr: *mut cairo_t, 316 dashes: *const c_double, 317 num_dashes: c_int, 318 offset: c_double, 319 ); cairo_get_dash_count(cr: *mut cairo_t) -> c_int320 pub fn cairo_get_dash_count(cr: *mut cairo_t) -> c_int; cairo_get_dash(cr: *mut cairo_t, dashes: *mut c_double, offset: *mut c_double)321 pub fn cairo_get_dash(cr: *mut cairo_t, dashes: *mut c_double, offset: *mut c_double); cairo_set_fill_rule(cr: *mut cairo_t, fill_rule: cairo_fill_rule_t)322 pub fn cairo_set_fill_rule(cr: *mut cairo_t, fill_rule: cairo_fill_rule_t); cairo_get_fill_rule(cr: *mut cairo_t) -> cairo_fill_rule_t323 pub fn cairo_get_fill_rule(cr: *mut cairo_t) -> cairo_fill_rule_t; cairo_set_line_cap(cr: *mut cairo_t, line_cap: cairo_line_cap_t)324 pub fn cairo_set_line_cap(cr: *mut cairo_t, line_cap: cairo_line_cap_t); cairo_get_line_cap(cr: *mut cairo_t) -> cairo_line_cap_t325 pub fn cairo_get_line_cap(cr: *mut cairo_t) -> cairo_line_cap_t; cairo_set_line_join(cr: *mut cairo_t, line_join: cairo_line_join_t)326 pub fn cairo_set_line_join(cr: *mut cairo_t, line_join: cairo_line_join_t); cairo_get_line_join(cr: *mut cairo_t) -> cairo_line_join_t327 pub fn cairo_get_line_join(cr: *mut cairo_t) -> cairo_line_join_t; cairo_set_line_width(cr: *mut cairo_t, width: c_double)328 pub fn cairo_set_line_width(cr: *mut cairo_t, width: c_double); cairo_get_line_width(cr: *mut cairo_t) -> c_double329 pub fn cairo_get_line_width(cr: *mut cairo_t) -> c_double; cairo_set_miter_limit(cr: *mut cairo_t, limit: c_double)330 pub fn cairo_set_miter_limit(cr: *mut cairo_t, limit: c_double); cairo_get_miter_limit(cr: *mut cairo_t) -> c_double331 pub fn cairo_get_miter_limit(cr: *mut cairo_t) -> c_double; cairo_set_operator(cr: *mut cairo_t, op: cairo_operator_t)332 pub fn cairo_set_operator(cr: *mut cairo_t, op: cairo_operator_t); cairo_get_operator(cr: *mut cairo_t) -> cairo_operator_t333 pub fn cairo_get_operator(cr: *mut cairo_t) -> cairo_operator_t; cairo_set_tolerance(cr: *mut cairo_t, tolerance: c_double)334 pub fn cairo_set_tolerance(cr: *mut cairo_t, tolerance: c_double); cairo_get_tolerance(cr: *mut cairo_t) -> c_double335 pub fn cairo_get_tolerance(cr: *mut cairo_t) -> c_double; cairo_clip(cr: *mut cairo_t)336 pub fn cairo_clip(cr: *mut cairo_t); cairo_clip_preserve(cr: *mut cairo_t)337 pub fn cairo_clip_preserve(cr: *mut cairo_t); cairo_clip_extents( cr: *mut cairo_t, x1: *mut c_double, y1: *mut c_double, x2: *mut c_double, y2: *mut c_double, )338 pub fn cairo_clip_extents( 339 cr: *mut cairo_t, 340 x1: *mut c_double, 341 y1: *mut c_double, 342 x2: *mut c_double, 343 y2: *mut c_double, 344 ); cairo_in_clip(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t345 pub fn cairo_in_clip(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t; cairo_reset_clip(cr: *mut cairo_t)346 pub fn cairo_reset_clip(cr: *mut cairo_t); cairo_rectangle_list_destroy(rectangle_list: *mut cairo_rectangle_list_t)347 pub fn cairo_rectangle_list_destroy(rectangle_list: *mut cairo_rectangle_list_t); cairo_copy_clip_rectangle_list(cr: *mut cairo_t) -> *mut cairo_rectangle_list_t348 pub fn cairo_copy_clip_rectangle_list(cr: *mut cairo_t) -> *mut cairo_rectangle_list_t; cairo_fill(cr: *mut cairo_t)349 pub fn cairo_fill(cr: *mut cairo_t); cairo_fill_preserve(cr: *mut cairo_t)350 pub fn cairo_fill_preserve(cr: *mut cairo_t); cairo_fill_extents( cr: *mut cairo_t, x1: *mut c_double, y1: *mut c_double, x2: *mut c_double, y2: *mut c_double, )351 pub fn cairo_fill_extents( 352 cr: *mut cairo_t, 353 x1: *mut c_double, 354 y1: *mut c_double, 355 x2: *mut c_double, 356 y2: *mut c_double, 357 ); cairo_in_fill(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t358 pub fn cairo_in_fill(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t; cairo_mask(cr: *mut cairo_t, pattern: *mut cairo_pattern_t)359 pub fn cairo_mask(cr: *mut cairo_t, pattern: *mut cairo_pattern_t); cairo_mask_surface( cr: *mut cairo_t, surface: *mut cairo_surface_t, surface_x: c_double, surface_y: c_double, )360 pub fn cairo_mask_surface( 361 cr: *mut cairo_t, 362 surface: *mut cairo_surface_t, 363 surface_x: c_double, 364 surface_y: c_double, 365 ); cairo_paint(cr: *mut cairo_t)366 pub fn cairo_paint(cr: *mut cairo_t); cairo_paint_with_alpha(cr: *mut cairo_t, alpha: c_double)367 pub fn cairo_paint_with_alpha(cr: *mut cairo_t, alpha: c_double); cairo_stroke(cr: *mut cairo_t)368 pub fn cairo_stroke(cr: *mut cairo_t); cairo_stroke_preserve(cr: *mut cairo_t)369 pub fn cairo_stroke_preserve(cr: *mut cairo_t); cairo_stroke_extents( cr: *mut cairo_t, x1: *mut c_double, y1: *mut c_double, x2: *mut c_double, y2: *mut c_double, )370 pub fn cairo_stroke_extents( 371 cr: *mut cairo_t, 372 x1: *mut c_double, 373 y1: *mut c_double, 374 x2: *mut c_double, 375 y2: *mut c_double, 376 ); cairo_in_stroke(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t377 pub fn cairo_in_stroke(cr: *mut cairo_t, x: c_double, y: c_double) -> cairo_bool_t; cairo_copy_page(cr: *mut cairo_t)378 pub fn cairo_copy_page(cr: *mut cairo_t); cairo_show_page(cr: *mut cairo_t)379 pub fn cairo_show_page(cr: *mut cairo_t); cairo_get_reference_count(cr: *mut cairo_t) -> c_uint380 pub fn cairo_get_reference_count(cr: *mut cairo_t) -> c_uint; 381 #[cfg(any(feature = "v1_16", feature = "dox"))] cairo_tag_begin(cr: *mut cairo_t, tag_name: *const c_char, attributes: *const c_char)382 pub fn cairo_tag_begin(cr: *mut cairo_t, tag_name: *const c_char, attributes: *const c_char); 383 #[cfg(any(feature = "v1_16", feature = "dox"))] cairo_tag_end(cr: *mut cairo_t, tag_name: *const c_char)384 pub fn cairo_tag_end(cr: *mut cairo_t, tag_name: *const c_char); 385 386 // CAIRO UTILS cairo_status_to_string(status: cairo_status_t) -> *const c_char387 pub fn cairo_status_to_string(status: cairo_status_t) -> *const c_char; cairo_debug_reset_static_data()388 pub fn cairo_debug_reset_static_data(); cairo_version() -> c_int389 pub fn cairo_version() -> c_int; cairo_version_string() -> *const c_char390 pub fn cairo_version_string() -> *const c_char; 391 392 // CAIRO PATHS cairo_copy_path(cr: *mut cairo_t) -> *mut cairo_path_t393 pub fn cairo_copy_path(cr: *mut cairo_t) -> *mut cairo_path_t; cairo_copy_path_flat(cr: *mut cairo_t) -> *mut cairo_path_t394 pub fn cairo_copy_path_flat(cr: *mut cairo_t) -> *mut cairo_path_t; cairo_path_destroy(path: *mut cairo_path_t)395 pub fn cairo_path_destroy(path: *mut cairo_path_t); cairo_append_path(cr: *mut cairo_t, path: *mut cairo_path_t)396 pub fn cairo_append_path(cr: *mut cairo_t, path: *mut cairo_path_t); cairo_has_current_point(cr: *mut cairo_t) -> cairo_bool_t397 pub fn cairo_has_current_point(cr: *mut cairo_t) -> cairo_bool_t; cairo_get_current_point(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double)398 pub fn cairo_get_current_point(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double); cairo_new_path(cr: *mut cairo_t)399 pub fn cairo_new_path(cr: *mut cairo_t); cairo_new_sub_path(cr: *mut cairo_t)400 pub fn cairo_new_sub_path(cr: *mut cairo_t); cairo_close_path(cr: *mut cairo_t)401 pub fn cairo_close_path(cr: *mut cairo_t); cairo_arc( cr: *mut cairo_t, xc: c_double, yc: c_double, radius: c_double, angle1: c_double, angle2: c_double, )402 pub fn cairo_arc( 403 cr: *mut cairo_t, 404 xc: c_double, 405 yc: c_double, 406 radius: c_double, 407 angle1: c_double, 408 angle2: c_double, 409 ); cairo_arc_negative( cr: *mut cairo_t, xc: c_double, yc: c_double, radius: c_double, angle1: c_double, angle2: c_double, )410 pub fn cairo_arc_negative( 411 cr: *mut cairo_t, 412 xc: c_double, 413 yc: c_double, 414 radius: c_double, 415 angle1: c_double, 416 angle2: c_double, 417 ); cairo_curve_to( cr: *mut cairo_t, x1: c_double, y1: c_double, x2: c_double, y2: c_double, x3: c_double, y3: c_double, )418 pub fn cairo_curve_to( 419 cr: *mut cairo_t, 420 x1: c_double, 421 y1: c_double, 422 x2: c_double, 423 y2: c_double, 424 x3: c_double, 425 y3: c_double, 426 ); cairo_line_to(cr: *mut cairo_t, x: c_double, y: c_double)427 pub fn cairo_line_to(cr: *mut cairo_t, x: c_double, y: c_double); cairo_move_to(cr: *mut cairo_t, x: c_double, y: c_double)428 pub fn cairo_move_to(cr: *mut cairo_t, x: c_double, y: c_double); cairo_rectangle( cr: *mut cairo_t, x: c_double, y: c_double, width: c_double, height: c_double, )429 pub fn cairo_rectangle( 430 cr: *mut cairo_t, 431 x: c_double, 432 y: c_double, 433 width: c_double, 434 height: c_double, 435 ); cairo_glyph_path(cr: *mut cairo_t, glyphs: *const Glyph, num_glyphs: c_int)436 pub fn cairo_glyph_path(cr: *mut cairo_t, glyphs: *const Glyph, num_glyphs: c_int); cairo_text_path(cr: *mut cairo_t, utf8: *const c_char)437 pub fn cairo_text_path(cr: *mut cairo_t, utf8: *const c_char); cairo_rel_curve_to( cr: *mut cairo_t, dx1: c_double, dy1: c_double, dx2: c_double, dy2: c_double, dx3: c_double, dy3: c_double, )438 pub fn cairo_rel_curve_to( 439 cr: *mut cairo_t, 440 dx1: c_double, 441 dy1: c_double, 442 dx2: c_double, 443 dy2: c_double, 444 dx3: c_double, 445 dy3: c_double, 446 ); cairo_rel_line_to(cr: *mut cairo_t, dx: c_double, dy: c_double)447 pub fn cairo_rel_line_to(cr: *mut cairo_t, dx: c_double, dy: c_double); cairo_rel_move_to(cr: *mut cairo_t, dx: c_double, dy: c_double)448 pub fn cairo_rel_move_to(cr: *mut cairo_t, dx: c_double, dy: c_double); cairo_path_extents( cr: *mut cairo_t, x1: *mut c_double, y1: *mut c_double, x2: *mut c_double, y2: *mut c_double, )449 pub fn cairo_path_extents( 450 cr: *mut cairo_t, 451 x1: *mut c_double, 452 y1: *mut c_double, 453 x2: *mut c_double, 454 y2: *mut c_double, 455 ); 456 457 // CAIRO TRANSFORMATIONS cairo_translate(cr: *mut cairo_t, tx: c_double, ty: c_double)458 pub fn cairo_translate(cr: *mut cairo_t, tx: c_double, ty: c_double); cairo_scale(cr: *mut cairo_t, sx: c_double, sy: c_double)459 pub fn cairo_scale(cr: *mut cairo_t, sx: c_double, sy: c_double); cairo_rotate(cr: *mut cairo_t, angle: c_double)460 pub fn cairo_rotate(cr: *mut cairo_t, angle: c_double); cairo_transform(cr: *mut cairo_t, matrix: *const Matrix)461 pub fn cairo_transform(cr: *mut cairo_t, matrix: *const Matrix); cairo_set_matrix(cr: *mut cairo_t, matrix: *const Matrix)462 pub fn cairo_set_matrix(cr: *mut cairo_t, matrix: *const Matrix); cairo_get_matrix(cr: *mut cairo_t, matrix: *mut Matrix)463 pub fn cairo_get_matrix(cr: *mut cairo_t, matrix: *mut Matrix); cairo_identity_matrix(cr: *mut cairo_t)464 pub fn cairo_identity_matrix(cr: *mut cairo_t); cairo_user_to_device(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double)465 pub fn cairo_user_to_device(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double); cairo_user_to_device_distance(cr: *mut cairo_t, dx: *mut c_double, dy: *mut c_double)466 pub fn cairo_user_to_device_distance(cr: *mut cairo_t, dx: *mut c_double, dy: *mut c_double); cairo_device_to_user(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double)467 pub fn cairo_device_to_user(cr: *mut cairo_t, x: *mut c_double, y: *mut c_double); cairo_device_to_user_distance(cr: *mut cairo_t, dx: *mut c_double, dy: *mut c_double)468 pub fn cairo_device_to_user_distance(cr: *mut cairo_t, dx: *mut c_double, dy: *mut c_double); 469 470 // CAIRO PATTERNS cairo_pattern_add_color_stop_rgb( pattern: *mut cairo_pattern_t, offset: c_double, red: c_double, green: c_double, blue: c_double, )471 pub fn cairo_pattern_add_color_stop_rgb( 472 pattern: *mut cairo_pattern_t, 473 offset: c_double, 474 red: c_double, 475 green: c_double, 476 blue: c_double, 477 ); cairo_pattern_add_color_stop_rgba( pattern: *mut cairo_pattern_t, offset: c_double, red: c_double, green: c_double, blue: c_double, alpha: c_double, )478 pub fn cairo_pattern_add_color_stop_rgba( 479 pattern: *mut cairo_pattern_t, 480 offset: c_double, 481 red: c_double, 482 green: c_double, 483 blue: c_double, 484 alpha: c_double, 485 ); cairo_pattern_get_color_stop_count( pattern: *mut cairo_pattern_t, count: *mut c_int, ) -> cairo_status_t486 pub fn cairo_pattern_get_color_stop_count( 487 pattern: *mut cairo_pattern_t, 488 count: *mut c_int, 489 ) -> cairo_status_t; cairo_pattern_get_color_stop_rgba( pattern: *mut cairo_pattern_t, index: c_int, offset: *mut c_double, red: *mut c_double, green: *mut c_double, blue: *mut c_double, alpha: *mut c_double, ) -> cairo_status_t490 pub fn cairo_pattern_get_color_stop_rgba( 491 pattern: *mut cairo_pattern_t, 492 index: c_int, 493 offset: *mut c_double, 494 red: *mut c_double, 495 green: *mut c_double, 496 blue: *mut c_double, 497 alpha: *mut c_double, 498 ) -> cairo_status_t; cairo_pattern_create_rgb( red: c_double, green: c_double, blue: c_double, ) -> *mut cairo_pattern_t499 pub fn cairo_pattern_create_rgb( 500 red: c_double, 501 green: c_double, 502 blue: c_double, 503 ) -> *mut cairo_pattern_t; cairo_pattern_create_rgba( red: c_double, green: c_double, blue: c_double, alpha: c_double, ) -> *mut cairo_pattern_t504 pub fn cairo_pattern_create_rgba( 505 red: c_double, 506 green: c_double, 507 blue: c_double, 508 alpha: c_double, 509 ) -> *mut cairo_pattern_t; cairo_pattern_get_rgba( pattern: *mut cairo_pattern_t, red: *mut c_double, green: *mut c_double, blue: *mut c_double, alpha: *mut c_double, ) -> cairo_status_t510 pub fn cairo_pattern_get_rgba( 511 pattern: *mut cairo_pattern_t, 512 red: *mut c_double, 513 green: *mut c_double, 514 blue: *mut c_double, 515 alpha: *mut c_double, 516 ) -> cairo_status_t; cairo_pattern_create_for_surface(surface: *mut cairo_surface_t) -> *mut cairo_pattern_t517 pub fn cairo_pattern_create_for_surface(surface: *mut cairo_surface_t) -> *mut cairo_pattern_t; cairo_pattern_get_surface( pattern: *mut cairo_pattern_t, surface: *mut *mut cairo_surface_t, ) -> cairo_status_t518 pub fn cairo_pattern_get_surface( 519 pattern: *mut cairo_pattern_t, 520 surface: *mut *mut cairo_surface_t, 521 ) -> cairo_status_t; cairo_pattern_create_linear( x0: c_double, y0: c_double, x1: c_double, y1: c_double, ) -> *mut cairo_pattern_t522 pub fn cairo_pattern_create_linear( 523 x0: c_double, 524 y0: c_double, 525 x1: c_double, 526 y1: c_double, 527 ) -> *mut cairo_pattern_t; cairo_pattern_get_linear_points( pattern: *mut cairo_pattern_t, x0: *mut c_double, y0: *mut c_double, x1: *mut c_double, y1: *mut c_double, ) -> cairo_status_t528 pub fn cairo_pattern_get_linear_points( 529 pattern: *mut cairo_pattern_t, 530 x0: *mut c_double, 531 y0: *mut c_double, 532 x1: *mut c_double, 533 y1: *mut c_double, 534 ) -> cairo_status_t; cairo_pattern_create_radial( cx0: c_double, cy0: c_double, radius0: c_double, cx1: c_double, cy1: c_double, radius1: c_double, ) -> *mut cairo_pattern_t535 pub fn cairo_pattern_create_radial( 536 cx0: c_double, 537 cy0: c_double, 538 radius0: c_double, 539 cx1: c_double, 540 cy1: c_double, 541 radius1: c_double, 542 ) -> *mut cairo_pattern_t; cairo_pattern_get_radial_circles( pattern: *mut cairo_pattern_t, x0: *mut c_double, y0: *mut c_double, r0: *mut c_double, x1: *mut c_double, y1: *mut c_double, r1: *mut c_double, ) -> cairo_status_t543 pub fn cairo_pattern_get_radial_circles( 544 pattern: *mut cairo_pattern_t, 545 x0: *mut c_double, 546 y0: *mut c_double, 547 r0: *mut c_double, 548 x1: *mut c_double, 549 y1: *mut c_double, 550 r1: *mut c_double, 551 ) -> cairo_status_t; cairo_pattern_create_mesh() -> *mut cairo_pattern_t552 pub fn cairo_pattern_create_mesh() -> *mut cairo_pattern_t; cairo_mesh_pattern_begin_patch(pattern: *mut cairo_pattern_t)553 pub fn cairo_mesh_pattern_begin_patch(pattern: *mut cairo_pattern_t); cairo_mesh_pattern_end_patch(pattern: *mut cairo_pattern_t)554 pub fn cairo_mesh_pattern_end_patch(pattern: *mut cairo_pattern_t); cairo_mesh_pattern_move_to(pattern: *mut cairo_pattern_t, x: c_double, y: c_double)555 pub fn cairo_mesh_pattern_move_to(pattern: *mut cairo_pattern_t, x: c_double, y: c_double); cairo_mesh_pattern_line_to(pattern: *mut cairo_pattern_t, x: c_double, y: c_double)556 pub fn cairo_mesh_pattern_line_to(pattern: *mut cairo_pattern_t, x: c_double, y: c_double); cairo_mesh_pattern_curve_to( pattern: *mut cairo_pattern_t, x1: c_double, y1: c_double, x2: c_double, y2: c_double, x3: c_double, y3: c_double, )557 pub fn cairo_mesh_pattern_curve_to( 558 pattern: *mut cairo_pattern_t, 559 x1: c_double, 560 y1: c_double, 561 x2: c_double, 562 y2: c_double, 563 x3: c_double, 564 y3: c_double, 565 ); cairo_mesh_pattern_set_control_point( pattern: *mut cairo_pattern_t, point_num: cairo_mesh_corner_t, x: c_double, y: c_double, )566 pub fn cairo_mesh_pattern_set_control_point( 567 pattern: *mut cairo_pattern_t, 568 point_num: cairo_mesh_corner_t, 569 x: c_double, 570 y: c_double, 571 ); cairo_mesh_pattern_set_corner_color_rgb( pattern: *mut cairo_pattern_t, corner_num: cairo_mesh_corner_t, red: c_double, green: c_double, blue: c_double, )572 pub fn cairo_mesh_pattern_set_corner_color_rgb( 573 pattern: *mut cairo_pattern_t, 574 corner_num: cairo_mesh_corner_t, 575 red: c_double, 576 green: c_double, 577 blue: c_double, 578 ); cairo_mesh_pattern_set_corner_color_rgba( pattern: *mut cairo_pattern_t, corner_num: cairo_mesh_corner_t, red: c_double, green: c_double, blue: c_double, alpha: c_double, )579 pub fn cairo_mesh_pattern_set_corner_color_rgba( 580 pattern: *mut cairo_pattern_t, 581 corner_num: cairo_mesh_corner_t, 582 red: c_double, 583 green: c_double, 584 blue: c_double, 585 alpha: c_double, 586 ); cairo_mesh_pattern_get_patch_count( pattern: *mut cairo_pattern_t, count: *mut c_uint, ) -> cairo_status_t587 pub fn cairo_mesh_pattern_get_patch_count( 588 pattern: *mut cairo_pattern_t, 589 count: *mut c_uint, 590 ) -> cairo_status_t; cairo_mesh_pattern_get_path( pattern: *mut cairo_pattern_t, patch_num: c_uint, ) -> *mut cairo_path_t591 pub fn cairo_mesh_pattern_get_path( 592 pattern: *mut cairo_pattern_t, 593 patch_num: c_uint, 594 ) -> *mut cairo_path_t; cairo_mesh_pattern_get_control_point( pattern: *mut cairo_pattern_t, patch_num: c_uint, point_num: cairo_mesh_corner_t, x: *mut c_double, y: *mut c_double, ) -> cairo_status_t595 pub fn cairo_mesh_pattern_get_control_point( 596 pattern: *mut cairo_pattern_t, 597 patch_num: c_uint, 598 point_num: cairo_mesh_corner_t, 599 x: *mut c_double, 600 y: *mut c_double, 601 ) -> cairo_status_t; cairo_mesh_pattern_get_corner_color_rgba( pattern: *mut cairo_pattern_t, patch_num: c_uint, corner_num: cairo_mesh_corner_t, red: *mut c_double, green: *mut c_double, blue: *mut c_double, alpha: *mut c_double, ) -> cairo_status_t602 pub fn cairo_mesh_pattern_get_corner_color_rgba( 603 pattern: *mut cairo_pattern_t, 604 patch_num: c_uint, 605 corner_num: cairo_mesh_corner_t, 606 red: *mut c_double, 607 green: *mut c_double, 608 blue: *mut c_double, 609 alpha: *mut c_double, 610 ) -> cairo_status_t; cairo_pattern_reference(pattern: *mut cairo_pattern_t) -> *mut cairo_pattern_t611 pub fn cairo_pattern_reference(pattern: *mut cairo_pattern_t) -> *mut cairo_pattern_t; cairo_pattern_destroy(pattern: *mut cairo_pattern_t)612 pub fn cairo_pattern_destroy(pattern: *mut cairo_pattern_t); cairo_pattern_status(pattern: *mut cairo_pattern_t) -> cairo_status_t613 pub fn cairo_pattern_status(pattern: *mut cairo_pattern_t) -> cairo_status_t; cairo_pattern_set_extend(pattern: *mut cairo_pattern_t, extend: cairo_extend_t)614 pub fn cairo_pattern_set_extend(pattern: *mut cairo_pattern_t, extend: cairo_extend_t); cairo_pattern_get_extend(pattern: *mut cairo_pattern_t) -> cairo_extend_t615 pub fn cairo_pattern_get_extend(pattern: *mut cairo_pattern_t) -> cairo_extend_t; cairo_pattern_set_filter(pattern: *mut cairo_pattern_t, filter: cairo_filter_t)616 pub fn cairo_pattern_set_filter(pattern: *mut cairo_pattern_t, filter: cairo_filter_t); cairo_pattern_get_filter(pattern: *mut cairo_pattern_t) -> cairo_filter_t617 pub fn cairo_pattern_get_filter(pattern: *mut cairo_pattern_t) -> cairo_filter_t; cairo_pattern_set_matrix(pattern: *mut cairo_pattern_t, matrix: *const Matrix)618 pub fn cairo_pattern_set_matrix(pattern: *mut cairo_pattern_t, matrix: *const Matrix); cairo_pattern_get_matrix(pattern: *mut cairo_pattern_t, matrix: *mut Matrix)619 pub fn cairo_pattern_get_matrix(pattern: *mut cairo_pattern_t, matrix: *mut Matrix); cairo_pattern_get_type(pattern: *mut cairo_pattern_t) -> cairo_pattern_type_t620 pub fn cairo_pattern_get_type(pattern: *mut cairo_pattern_t) -> cairo_pattern_type_t; cairo_pattern_get_reference_count(pattern: *mut cairo_pattern_t) -> c_uint621 pub fn cairo_pattern_get_reference_count(pattern: *mut cairo_pattern_t) -> c_uint; cairo_pattern_set_user_data( pattern: *mut cairo_pattern_t, key: *const cairo_user_data_key_t, user_data: *mut c_void, destroy: cairo_destroy_func_t, ) -> cairo_status_t622 pub fn cairo_pattern_set_user_data( 623 pattern: *mut cairo_pattern_t, 624 key: *const cairo_user_data_key_t, 625 user_data: *mut c_void, 626 destroy: cairo_destroy_func_t, 627 ) -> cairo_status_t; cairo_pattern_get_user_data( pattern: *mut cairo_pattern_t, key: *const cairo_user_data_key_t, ) -> *mut c_void628 pub fn cairo_pattern_get_user_data( 629 pattern: *mut cairo_pattern_t, 630 key: *const cairo_user_data_key_t, 631 ) -> *mut c_void; 632 633 // CAIRO REGIONS cairo_region_create() -> *mut cairo_region_t634 pub fn cairo_region_create() -> *mut cairo_region_t; cairo_region_create_rectangle( rectangle: *mut cairo_rectangle_int_t, ) -> *mut cairo_region_t635 pub fn cairo_region_create_rectangle( 636 rectangle: *mut cairo_rectangle_int_t, 637 ) -> *mut cairo_region_t; cairo_region_create_rectangles( rects: *mut cairo_rectangle_int_t, count: c_int, ) -> *mut cairo_region_t638 pub fn cairo_region_create_rectangles( 639 rects: *mut cairo_rectangle_int_t, 640 count: c_int, 641 ) -> *mut cairo_region_t; cairo_region_copy(original: *mut cairo_region_t) -> *mut cairo_region_t642 pub fn cairo_region_copy(original: *mut cairo_region_t) -> *mut cairo_region_t; cairo_region_reference(region: *mut cairo_region_t) -> *mut cairo_region_t643 pub fn cairo_region_reference(region: *mut cairo_region_t) -> *mut cairo_region_t; cairo_region_destroy(region: *mut cairo_region_t)644 pub fn cairo_region_destroy(region: *mut cairo_region_t); cairo_region_status(region: *mut cairo_region_t) -> cairo_status_t645 pub fn cairo_region_status(region: *mut cairo_region_t) -> cairo_status_t; cairo_region_get_extents( region: *mut cairo_region_t, extents: *mut cairo_rectangle_int_t, )646 pub fn cairo_region_get_extents( 647 region: *mut cairo_region_t, 648 extents: *mut cairo_rectangle_int_t, 649 ); cairo_region_num_rectangles(region: *mut cairo_region_t) -> c_int650 pub fn cairo_region_num_rectangles(region: *mut cairo_region_t) -> c_int; cairo_region_get_rectangle( region: *mut cairo_region_t, nth: c_int, rectangle: *mut cairo_rectangle_int_t, )651 pub fn cairo_region_get_rectangle( 652 region: *mut cairo_region_t, 653 nth: c_int, 654 rectangle: *mut cairo_rectangle_int_t, 655 ); cairo_region_is_empty(region: *mut cairo_region_t) -> cairo_bool_t656 pub fn cairo_region_is_empty(region: *mut cairo_region_t) -> cairo_bool_t; cairo_region_contains_point( region: *mut cairo_region_t, x: c_int, y: c_int, ) -> cairo_bool_t657 pub fn cairo_region_contains_point( 658 region: *mut cairo_region_t, 659 x: c_int, 660 y: c_int, 661 ) -> cairo_bool_t; cairo_region_contains_rectangle( region: *mut cairo_region_t, rectangle: *mut cairo_rectangle_int_t, ) -> cairo_region_overlap_t662 pub fn cairo_region_contains_rectangle( 663 region: *mut cairo_region_t, 664 rectangle: *mut cairo_rectangle_int_t, 665 ) -> cairo_region_overlap_t; cairo_region_equal(a: *mut cairo_region_t, b: *mut cairo_region_t) -> cairo_bool_t666 pub fn cairo_region_equal(a: *mut cairo_region_t, b: *mut cairo_region_t) -> cairo_bool_t; cairo_region_translate(region: *mut cairo_region_t, dx: c_int, dy: c_int)667 pub fn cairo_region_translate(region: *mut cairo_region_t, dx: c_int, dy: c_int); cairo_region_intersect( dst: *mut cairo_region_t, other: *mut cairo_region_t, ) -> cairo_status_t668 pub fn cairo_region_intersect( 669 dst: *mut cairo_region_t, 670 other: *mut cairo_region_t, 671 ) -> cairo_status_t; cairo_region_intersect_rectangle( dst: *mut cairo_region_t, rectangle: *mut cairo_rectangle_int_t, ) -> cairo_status_t672 pub fn cairo_region_intersect_rectangle( 673 dst: *mut cairo_region_t, 674 rectangle: *mut cairo_rectangle_int_t, 675 ) -> cairo_status_t; cairo_region_subtract( dst: *mut cairo_region_t, other: *mut cairo_region_t, ) -> cairo_status_t676 pub fn cairo_region_subtract( 677 dst: *mut cairo_region_t, 678 other: *mut cairo_region_t, 679 ) -> cairo_status_t; cairo_region_subtract_rectangle( dst: *mut cairo_region_t, rectangle: *mut cairo_rectangle_int_t, ) -> cairo_status_t680 pub fn cairo_region_subtract_rectangle( 681 dst: *mut cairo_region_t, 682 rectangle: *mut cairo_rectangle_int_t, 683 ) -> cairo_status_t; cairo_region_union( dst: *mut cairo_region_t, other: *mut cairo_region_t, ) -> cairo_status_t684 pub fn cairo_region_union( 685 dst: *mut cairo_region_t, 686 other: *mut cairo_region_t, 687 ) -> cairo_status_t; cairo_region_union_rectangle( dst: *mut cairo_region_t, rectangle: *mut cairo_rectangle_int_t, ) -> cairo_status_t688 pub fn cairo_region_union_rectangle( 689 dst: *mut cairo_region_t, 690 rectangle: *mut cairo_rectangle_int_t, 691 ) -> cairo_status_t; cairo_region_xor(dst: *mut cairo_region_t, other: *mut cairo_region_t) -> cairo_status_t692 pub fn cairo_region_xor(dst: *mut cairo_region_t, other: *mut cairo_region_t) 693 -> cairo_status_t; cairo_region_xor_rectangle( dst: *mut cairo_region_t, rectangle: *mut cairo_rectangle_int_t, ) -> cairo_status_t694 pub fn cairo_region_xor_rectangle( 695 dst: *mut cairo_region_t, 696 rectangle: *mut cairo_rectangle_int_t, 697 ) -> cairo_status_t; 698 699 // text cairo_select_font_face( cr: *mut cairo_t, family: *const c_char, slant: cairo_font_slant_t, weight: cairo_font_weight_t, )700 pub fn cairo_select_font_face( 701 cr: *mut cairo_t, 702 family: *const c_char, 703 slant: cairo_font_slant_t, 704 weight: cairo_font_weight_t, 705 ); cairo_set_font_size(cr: *mut cairo_t, size: c_double)706 pub fn cairo_set_font_size(cr: *mut cairo_t, size: c_double); cairo_set_font_matrix(cr: *mut cairo_t, matrix: *const Matrix)707 pub fn cairo_set_font_matrix(cr: *mut cairo_t, matrix: *const Matrix); cairo_get_font_matrix(cr: *mut cairo_t, matrix: *mut Matrix)708 pub fn cairo_get_font_matrix(cr: *mut cairo_t, matrix: *mut Matrix); cairo_set_font_options(cr: *mut cairo_t, options: *const cairo_font_options_t)709 pub fn cairo_set_font_options(cr: *mut cairo_t, options: *const cairo_font_options_t); cairo_get_font_options(cr: *mut cairo_t, options: *mut cairo_font_options_t)710 pub fn cairo_get_font_options(cr: *mut cairo_t, options: *mut cairo_font_options_t); cairo_set_font_face(cr: *mut cairo_t, font_face: *mut cairo_font_face_t)711 pub fn cairo_set_font_face(cr: *mut cairo_t, font_face: *mut cairo_font_face_t); cairo_get_font_face(cr: *mut cairo_t) -> *mut cairo_font_face_t712 pub fn cairo_get_font_face(cr: *mut cairo_t) -> *mut cairo_font_face_t; cairo_set_scaled_font(cr: *mut cairo_t, scaled_font: *mut cairo_scaled_font_t)713 pub fn cairo_set_scaled_font(cr: *mut cairo_t, scaled_font: *mut cairo_scaled_font_t); cairo_get_scaled_font(cr: *mut cairo_t) -> *mut cairo_scaled_font_t714 pub fn cairo_get_scaled_font(cr: *mut cairo_t) -> *mut cairo_scaled_font_t; cairo_show_text(cr: *mut cairo_t, utf8: *const c_char)715 pub fn cairo_show_text(cr: *mut cairo_t, utf8: *const c_char); cairo_show_glyphs(cr: *mut cairo_t, glyphs: *const Glyph, num_glyphs: c_int)716 pub fn cairo_show_glyphs(cr: *mut cairo_t, glyphs: *const Glyph, num_glyphs: c_int); cairo_show_text_glyphs( cr: *mut cairo_t, utf8: *const c_char, utf8_len: c_int, glyphs: *const Glyph, num_glyphs: c_int, clusters: *const TextCluster, num_clusters: c_int, cluster_flags: cairo_text_cluster_flags_t, )717 pub fn cairo_show_text_glyphs( 718 cr: *mut cairo_t, 719 utf8: *const c_char, 720 utf8_len: c_int, 721 glyphs: *const Glyph, 722 num_glyphs: c_int, 723 clusters: *const TextCluster, 724 num_clusters: c_int, 725 cluster_flags: cairo_text_cluster_flags_t, 726 ); cairo_font_extents(cr: *mut cairo_t, extents: *mut FontExtents)727 pub fn cairo_font_extents(cr: *mut cairo_t, extents: *mut FontExtents); cairo_text_extents(cr: *mut cairo_t, utf8: *const c_char, extents: *mut TextExtents)728 pub fn cairo_text_extents(cr: *mut cairo_t, utf8: *const c_char, extents: *mut TextExtents); cairo_glyph_extents( cr: *mut cairo_t, glyphs: *const Glyph, num_glyphs: c_int, extents: *mut TextExtents, )729 pub fn cairo_glyph_extents( 730 cr: *mut cairo_t, 731 glyphs: *const Glyph, 732 num_glyphs: c_int, 733 extents: *mut TextExtents, 734 ); cairo_toy_font_face_create( family: *const c_char, slant: cairo_font_slant_t, weight: cairo_font_weight_t, ) -> *mut cairo_font_face_t735 pub fn cairo_toy_font_face_create( 736 family: *const c_char, 737 slant: cairo_font_slant_t, 738 weight: cairo_font_weight_t, 739 ) -> *mut cairo_font_face_t; cairo_toy_font_face_get_family(font_face: *mut cairo_font_face_t) -> *const c_char740 pub fn cairo_toy_font_face_get_family(font_face: *mut cairo_font_face_t) -> *const c_char; cairo_toy_font_face_get_slant(font_face: *mut cairo_font_face_t) -> cairo_font_slant_t741 pub fn cairo_toy_font_face_get_slant(font_face: *mut cairo_font_face_t) -> cairo_font_slant_t; cairo_toy_font_face_get_weight(font_face: *mut cairo_font_face_t) -> cairo_font_weight_t742 pub fn cairo_toy_font_face_get_weight(font_face: *mut cairo_font_face_t) 743 -> cairo_font_weight_t; cairo_glyph_allocate(num_glyphs: c_int) -> *mut Glyph744 pub fn cairo_glyph_allocate(num_glyphs: c_int) -> *mut Glyph; cairo_glyph_free(glyphs: *mut Glyph)745 pub fn cairo_glyph_free(glyphs: *mut Glyph); cairo_text_cluster_allocate(num_clusters: c_int) -> *mut TextCluster746 pub fn cairo_text_cluster_allocate(num_clusters: c_int) -> *mut TextCluster; cairo_text_cluster_free(clusters: *mut TextCluster)747 pub fn cairo_text_cluster_free(clusters: *mut TextCluster); 748 749 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_face_create_for_ft_face( face: FT_Face, load_flags: c_int, ) -> *mut cairo_font_face_t750 pub fn cairo_ft_font_face_create_for_ft_face( 751 face: FT_Face, 752 load_flags: c_int, 753 ) -> *mut cairo_font_face_t; 754 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_face_create_for_pattern(pattern: *mut FcPattern) -> *mut cairo_font_face_t755 pub fn cairo_ft_font_face_create_for_pattern(pattern: *mut FcPattern) 756 -> *mut cairo_font_face_t; 757 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_options_substitute( options: *const cairo_font_options_t, pattern: *mut FcPattern, )758 pub fn cairo_ft_font_options_substitute( 759 options: *const cairo_font_options_t, 760 pattern: *mut FcPattern, 761 ); 762 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_scaled_font_lock_face(scaled_font: *mut cairo_scaled_font_t) -> FT_Face763 pub fn cairo_ft_scaled_font_lock_face(scaled_font: *mut cairo_scaled_font_t) -> FT_Face; 764 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_scaled_font_unlock_face(scaled_font: *mut cairo_scaled_font_t)765 pub fn cairo_ft_scaled_font_unlock_face(scaled_font: *mut cairo_scaled_font_t); 766 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_face_get_synthesize( font_face: *mut cairo_font_face_t, ) -> cairo_ft_synthesize_t767 pub fn cairo_ft_font_face_get_synthesize( 768 font_face: *mut cairo_font_face_t, 769 ) -> cairo_ft_synthesize_t; 770 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_face_set_synthesize( font_face: *mut cairo_font_face_t, synth_flags: cairo_ft_synthesize_t, )771 pub fn cairo_ft_font_face_set_synthesize( 772 font_face: *mut cairo_font_face_t, 773 synth_flags: cairo_ft_synthesize_t, 774 ); 775 #[cfg(any(feature = "freetype", feature = "dox"))] cairo_ft_font_face_unset_synthesize( font_face: *mut cairo_font_face_t, synth_flags: cairo_ft_synthesize_t, )776 pub fn cairo_ft_font_face_unset_synthesize( 777 font_face: *mut cairo_font_face_t, 778 synth_flags: cairo_ft_synthesize_t, 779 ); 780 781 // CAIRO RASTER 782 //pub fn cairo_pattern_create_raster_source(user_data: *mut void, content: Content, width: c_int, height: c_int) -> *mut cairo_pattern_t; 783 //pub fn cairo_raster_source_pattern_set_callback_data(pattern: *mut cairo_pattern_t, data: *mut void); 784 //pub fn cairo_raster_source_pattern_get_callback_data(pattern: *mut cairo_pattern_t) -> *mut void; 785 /* FIXME how do we do these _func_t types? 786 pub fn cairo_raster_source_pattern_set_acquire(pattern: *mut cairo_pattern_t, acquire: cairo_raster_source_acquire_func_t, release: cairo_raster_source_release_func_t); 787 pub fn cairo_raster_source_pattern_get_acquire(pattern: *mut cairo_pattern_t, acquire: *mut cairo_raster_source_acquire_func_t, release: *mut cairo_raster_source_release_func_t); 788 pub fn cairo_raster_source_pattern_set_snapshot(pattern: *mut cairo_pattern_t, snapshot: cairo_raster_source_snapshot_func_t); 789 pub fn cairo_raster_source_pattern_get_snapshot(pattern: *mut cairo_pattern_t) -> cairo_raster_source_snapshot_func_t; 790 pub fn cairo_raster_source_pattern_set_copy(pattern: *mut cairo_pattern_t, copy: cairo_raster_source_copy_func_t); 791 pub fn cairo_raster_source_pattern_get_copy(pattern: *mut cairo_pattern_t) -> cairo_raster_source_copy_func_t; 792 pub fn cairo_raster_source_pattern_set_finish(pattern: *mut cairo_pattern_t, finish: cairo_raster_source_finish_func_t); 793 pub fn cairo_raster_source_pattern_get_finish(pattern: *mut cairo_pattern_t) -> cairo_raster_source_finish_func_t; 794 */ 795 796 //cairo_surface_t (*mut cairo_raster_source_acquire_func_t) 797 // (pattern: *mut cairo_pattern_t, callback_data: *mut void, target: *mut cairo_surface_t, extents: *mut cairo_rectangle_int_t); 798 //void (*mut cairo_raster_source_release_func_t) 799 // (pattern: *mut cairo_pattern_t, callback_data: *mut void, surface: *mut cairo_surface_t); 800 //Status (*mut cairo_raster_source_snapshot_func_t) 801 // (pattern: *mut cairo_pattern_t, callback_data: *mut void); 802 //Status (*mut cairo_raster_source_copy_func_t) (pattern: *mut cairo_pattern_t, callback_data: *mut void, other: *mut cairo_pattern_t); 803 //void (*mut cairo_raster_source_finish_func_t) 804 // (pattern: *mut cairo_pattern_t, callback_data: *mut void); 805 806 //CAIRO FONT cairo_font_face_reference(font_face: *mut cairo_font_face_t) -> *mut cairo_font_face_t807 pub fn cairo_font_face_reference(font_face: *mut cairo_font_face_t) -> *mut cairo_font_face_t; cairo_font_face_destroy(font_face: *mut cairo_font_face_t)808 pub fn cairo_font_face_destroy(font_face: *mut cairo_font_face_t); cairo_font_face_status(font_face: *mut cairo_font_face_t) -> cairo_status_t809 pub fn cairo_font_face_status(font_face: *mut cairo_font_face_t) -> cairo_status_t; cairo_font_face_get_type(font_face: *mut cairo_font_face_t) -> cairo_font_type_t810 pub fn cairo_font_face_get_type(font_face: *mut cairo_font_face_t) -> cairo_font_type_t; cairo_font_face_get_reference_count(font_face: *mut cairo_font_face_t) -> c_uint811 pub fn cairo_font_face_get_reference_count(font_face: *mut cairo_font_face_t) -> c_uint; cairo_font_face_set_user_data( font_face: *mut cairo_font_face_t, key: *const cairo_user_data_key_t, user_data: *mut c_void, destroy: cairo_destroy_func_t, ) -> cairo_status_t812 pub fn cairo_font_face_set_user_data( 813 font_face: *mut cairo_font_face_t, 814 key: *const cairo_user_data_key_t, 815 user_data: *mut c_void, 816 destroy: cairo_destroy_func_t, 817 ) -> cairo_status_t; cairo_font_face_get_user_data( font_face: *mut cairo_font_face_t, key: *const cairo_user_data_key_t, ) -> *mut c_void818 pub fn cairo_font_face_get_user_data( 819 font_face: *mut cairo_font_face_t, 820 key: *const cairo_user_data_key_t, 821 ) -> *mut c_void; 822 823 // CAIRO SCALED FONT cairo_scaled_font_create( font_face: *mut cairo_font_face_t, font_matrix: *const Matrix, ctm: *const Matrix, options: *const cairo_font_options_t, ) -> *mut cairo_scaled_font_t824 pub fn cairo_scaled_font_create( 825 font_face: *mut cairo_font_face_t, 826 font_matrix: *const Matrix, 827 ctm: *const Matrix, 828 options: *const cairo_font_options_t, 829 ) -> *mut cairo_scaled_font_t; cairo_scaled_font_reference( scaled_font: *mut cairo_scaled_font_t, ) -> *mut cairo_scaled_font_t830 pub fn cairo_scaled_font_reference( 831 scaled_font: *mut cairo_scaled_font_t, 832 ) -> *mut cairo_scaled_font_t; cairo_scaled_font_destroy(scaled_font: *mut cairo_scaled_font_t)833 pub fn cairo_scaled_font_destroy(scaled_font: *mut cairo_scaled_font_t); cairo_scaled_font_status(scaled_font: *mut cairo_scaled_font_t) -> cairo_status_t834 pub fn cairo_scaled_font_status(scaled_font: *mut cairo_scaled_font_t) -> cairo_status_t; cairo_scaled_font_extents( scaled_font: *mut cairo_scaled_font_t, extents: *mut FontExtents, )835 pub fn cairo_scaled_font_extents( 836 scaled_font: *mut cairo_scaled_font_t, 837 extents: *mut FontExtents, 838 ); cairo_scaled_font_text_extents( scaled_font: *mut cairo_scaled_font_t, utf8: *const c_char, extents: *mut TextExtents, )839 pub fn cairo_scaled_font_text_extents( 840 scaled_font: *mut cairo_scaled_font_t, 841 utf8: *const c_char, 842 extents: *mut TextExtents, 843 ); cairo_scaled_font_glyph_extents( scaled_font: *mut cairo_scaled_font_t, glyphs: *const Glyph, num_glyphs: c_int, extents: *mut TextExtents, )844 pub fn cairo_scaled_font_glyph_extents( 845 scaled_font: *mut cairo_scaled_font_t, 846 glyphs: *const Glyph, 847 num_glyphs: c_int, 848 extents: *mut TextExtents, 849 ); cairo_scaled_font_text_to_glyphs( scaled_font: *mut cairo_scaled_font_t, x: c_double, y: c_double, utf8: *const c_char, utf8_len: c_int, glyphs: *mut *mut Glyph, num_glyphs: *mut c_int, clusters: *mut *mut TextCluster, num_clusters: *mut c_int, cluster_flags: *mut cairo_text_cluster_flags_t, ) -> cairo_status_t850 pub fn cairo_scaled_font_text_to_glyphs( 851 scaled_font: *mut cairo_scaled_font_t, 852 x: c_double, 853 y: c_double, 854 utf8: *const c_char, 855 utf8_len: c_int, 856 glyphs: *mut *mut Glyph, 857 num_glyphs: *mut c_int, 858 clusters: *mut *mut TextCluster, 859 num_clusters: *mut c_int, 860 cluster_flags: *mut cairo_text_cluster_flags_t, 861 ) -> cairo_status_t; cairo_scaled_font_get_font_face( scaled_font: *mut cairo_scaled_font_t, ) -> *mut cairo_font_face_t862 pub fn cairo_scaled_font_get_font_face( 863 scaled_font: *mut cairo_scaled_font_t, 864 ) -> *mut cairo_font_face_t; cairo_scaled_font_get_font_options( scaled_font: *mut cairo_scaled_font_t, options: *mut cairo_font_options_t, )865 pub fn cairo_scaled_font_get_font_options( 866 scaled_font: *mut cairo_scaled_font_t, 867 options: *mut cairo_font_options_t, 868 ); cairo_scaled_font_get_font_matrix( scaled_font: *mut cairo_scaled_font_t, font_matrix: *mut Matrix, )869 pub fn cairo_scaled_font_get_font_matrix( 870 scaled_font: *mut cairo_scaled_font_t, 871 font_matrix: *mut Matrix, 872 ); cairo_scaled_font_get_ctm(scaled_font: *mut cairo_scaled_font_t, ctm: *mut Matrix)873 pub fn cairo_scaled_font_get_ctm(scaled_font: *mut cairo_scaled_font_t, ctm: *mut Matrix); cairo_scaled_font_get_scale_matrix( scaled_font: *mut cairo_scaled_font_t, scale_matrix: *mut Matrix, )874 pub fn cairo_scaled_font_get_scale_matrix( 875 scaled_font: *mut cairo_scaled_font_t, 876 scale_matrix: *mut Matrix, 877 ); cairo_scaled_font_get_type(scaled_font: *mut cairo_scaled_font_t) -> cairo_font_type_t878 pub fn cairo_scaled_font_get_type(scaled_font: *mut cairo_scaled_font_t) -> cairo_font_type_t; cairo_scaled_font_get_reference_count(font_face: *mut cairo_scaled_font_t) -> c_uint879 pub fn cairo_scaled_font_get_reference_count(font_face: *mut cairo_scaled_font_t) -> c_uint; cairo_scaled_font_set_user_data( scaled_font: *mut cairo_scaled_font_t, key: *const cairo_user_data_key_t, user_data: *mut c_void, destroy: cairo_destroy_func_t, ) -> cairo_status_t880 pub fn cairo_scaled_font_set_user_data( 881 scaled_font: *mut cairo_scaled_font_t, 882 key: *const cairo_user_data_key_t, 883 user_data: *mut c_void, 884 destroy: cairo_destroy_func_t, 885 ) -> cairo_status_t; cairo_scaled_font_get_user_data( scaled_font: *mut cairo_scaled_font_t, key: *const cairo_user_data_key_t, ) -> *mut c_void886 pub fn cairo_scaled_font_get_user_data( 887 scaled_font: *mut cairo_scaled_font_t, 888 key: *const cairo_user_data_key_t, 889 ) -> *mut c_void; 890 891 // CAIRO FONT OPTIONS cairo_font_options_create() -> *mut cairo_font_options_t892 pub fn cairo_font_options_create() -> *mut cairo_font_options_t; cairo_font_options_copy( original: *const cairo_font_options_t, ) -> *mut cairo_font_options_t893 pub fn cairo_font_options_copy( 894 original: *const cairo_font_options_t, 895 ) -> *mut cairo_font_options_t; cairo_font_options_destroy(options: *mut cairo_font_options_t)896 pub fn cairo_font_options_destroy(options: *mut cairo_font_options_t); cairo_font_options_status(options: *mut cairo_font_options_t) -> cairo_status_t897 pub fn cairo_font_options_status(options: *mut cairo_font_options_t) -> cairo_status_t; cairo_font_options_merge( options: *mut cairo_font_options_t, other: *const cairo_font_options_t, )898 pub fn cairo_font_options_merge( 899 options: *mut cairo_font_options_t, 900 other: *const cairo_font_options_t, 901 ); cairo_font_options_hash(options: *const cairo_font_options_t) -> c_ulong902 pub fn cairo_font_options_hash(options: *const cairo_font_options_t) -> c_ulong; cairo_font_options_equal( options: *const cairo_font_options_t, other: *const cairo_font_options_t, ) -> cairo_bool_t903 pub fn cairo_font_options_equal( 904 options: *const cairo_font_options_t, 905 other: *const cairo_font_options_t, 906 ) -> cairo_bool_t; cairo_font_options_set_antialias( options: *mut cairo_font_options_t, antialias: cairo_antialias_t, )907 pub fn cairo_font_options_set_antialias( 908 options: *mut cairo_font_options_t, 909 antialias: cairo_antialias_t, 910 ); cairo_font_options_get_antialias( options: *const cairo_font_options_t, ) -> cairo_antialias_t911 pub fn cairo_font_options_get_antialias( 912 options: *const cairo_font_options_t, 913 ) -> cairo_antialias_t; cairo_font_options_set_subpixel_order( options: *mut cairo_font_options_t, subpixel_order: cairo_subpixel_order_t, )914 pub fn cairo_font_options_set_subpixel_order( 915 options: *mut cairo_font_options_t, 916 subpixel_order: cairo_subpixel_order_t, 917 ); cairo_font_options_get_subpixel_order( options: *const cairo_font_options_t, ) -> cairo_subpixel_order_t918 pub fn cairo_font_options_get_subpixel_order( 919 options: *const cairo_font_options_t, 920 ) -> cairo_subpixel_order_t; cairo_font_options_set_hint_style( options: *mut cairo_font_options_t, hint_style: cairo_hint_style_t, )921 pub fn cairo_font_options_set_hint_style( 922 options: *mut cairo_font_options_t, 923 hint_style: cairo_hint_style_t, 924 ); cairo_font_options_get_hint_style( options: *const cairo_font_options_t, ) -> cairo_hint_style_t925 pub fn cairo_font_options_get_hint_style( 926 options: *const cairo_font_options_t, 927 ) -> cairo_hint_style_t; cairo_font_options_set_hint_metrics( options: *mut cairo_font_options_t, hint_metrics: cairo_hint_metrics_t, )928 pub fn cairo_font_options_set_hint_metrics( 929 options: *mut cairo_font_options_t, 930 hint_metrics: cairo_hint_metrics_t, 931 ); cairo_font_options_get_hint_metrics( options: *const cairo_font_options_t, ) -> cairo_hint_metrics_t932 pub fn cairo_font_options_get_hint_metrics( 933 options: *const cairo_font_options_t, 934 ) -> cairo_hint_metrics_t; 935 #[cfg(any(feature = "v1_16", feature = "dox"))] cairo_font_options_get_variations(options: *mut cairo_font_options_t) -> *const c_char936 pub fn cairo_font_options_get_variations(options: *mut cairo_font_options_t) -> *const c_char; 937 #[cfg(any(feature = "v1_16", feature = "dox"))] cairo_font_options_set_variations( options: *mut cairo_font_options_t, variations: *const c_char, )938 pub fn cairo_font_options_set_variations( 939 options: *mut cairo_font_options_t, 940 variations: *const c_char, 941 ); 942 943 // CAIRO MATRIX cairo_matrix_multiply(matrix: *mut Matrix, left: *const Matrix, right: *const Matrix)944 pub fn cairo_matrix_multiply(matrix: *mut Matrix, left: *const Matrix, right: *const Matrix); cairo_matrix_init( matrix: *mut Matrix, xx: f64, yx: f64, xy: f64, yy: f64, x0: f64, y0: f64, )945 pub fn cairo_matrix_init( 946 matrix: *mut Matrix, 947 xx: f64, 948 yx: f64, 949 xy: f64, 950 yy: f64, 951 x0: f64, 952 y0: f64, 953 ); cairo_matrix_init_identity(matrix: *mut Matrix)954 pub fn cairo_matrix_init_identity(matrix: *mut Matrix); cairo_matrix_translate(matrix: *mut Matrix, tx: f64, ty: f64)955 pub fn cairo_matrix_translate(matrix: *mut Matrix, tx: f64, ty: f64); cairo_matrix_scale(matrix: *mut Matrix, sx: f64, sy: f64)956 pub fn cairo_matrix_scale(matrix: *mut Matrix, sx: f64, sy: f64); cairo_matrix_rotate(matrix: *mut Matrix, angle: f64)957 pub fn cairo_matrix_rotate(matrix: *mut Matrix, angle: f64); cairo_matrix_invert(matrix: *mut Matrix) -> cairo_status_t958 pub fn cairo_matrix_invert(matrix: *mut Matrix) -> cairo_status_t; cairo_matrix_transform_distance(matrix: *const Matrix, dx: *mut f64, dy: *mut f64)959 pub fn cairo_matrix_transform_distance(matrix: *const Matrix, dx: *mut f64, dy: *mut f64); cairo_matrix_transform_point(matrix: *const Matrix, x: *mut f64, y: *mut f64)960 pub fn cairo_matrix_transform_point(matrix: *const Matrix, x: *mut f64, y: *mut f64); 961 962 // CAIRO SURFACE cairo_surface_destroy(surface: *mut cairo_surface_t)963 pub fn cairo_surface_destroy(surface: *mut cairo_surface_t); cairo_surface_flush(surface: *mut cairo_surface_t)964 pub fn cairo_surface_flush(surface: *mut cairo_surface_t); cairo_surface_finish(surface: *mut cairo_surface_t)965 pub fn cairo_surface_finish(surface: *mut cairo_surface_t); cairo_surface_status(surface: *mut cairo_surface_t) -> cairo_status_t966 pub fn cairo_surface_status(surface: *mut cairo_surface_t) -> cairo_status_t; cairo_surface_get_type(surface: *mut cairo_surface_t) -> cairo_surface_type_t967 pub fn cairo_surface_get_type(surface: *mut cairo_surface_t) -> cairo_surface_type_t; cairo_surface_reference(surface: *mut cairo_surface_t) -> *mut cairo_surface_t968 pub fn cairo_surface_reference(surface: *mut cairo_surface_t) -> *mut cairo_surface_t; cairo_surface_get_user_data( surface: *mut cairo_surface_t, key: *const cairo_user_data_key_t, ) -> *mut c_void969 pub fn cairo_surface_get_user_data( 970 surface: *mut cairo_surface_t, 971 key: *const cairo_user_data_key_t, 972 ) -> *mut c_void; cairo_surface_set_user_data( surface: *mut cairo_surface_t, key: *const cairo_user_data_key_t, user_data: *mut c_void, destroy: cairo_destroy_func_t, ) -> cairo_status_t973 pub fn cairo_surface_set_user_data( 974 surface: *mut cairo_surface_t, 975 key: *const cairo_user_data_key_t, 976 user_data: *mut c_void, 977 destroy: cairo_destroy_func_t, 978 ) -> cairo_status_t; cairo_surface_get_reference_count(surface: *mut cairo_surface_t) -> c_uint979 pub fn cairo_surface_get_reference_count(surface: *mut cairo_surface_t) -> c_uint; cairo_surface_mark_dirty(surface: *mut cairo_surface_t)980 pub fn cairo_surface_mark_dirty(surface: *mut cairo_surface_t); cairo_surface_mark_dirty_rectangle( surface: *mut cairo_surface_t, x: c_int, y: c_int, width: c_int, height: c_int, )981 pub fn cairo_surface_mark_dirty_rectangle( 982 surface: *mut cairo_surface_t, 983 x: c_int, 984 y: c_int, 985 width: c_int, 986 height: c_int, 987 ); cairo_surface_create_similar( surface: *mut cairo_surface_t, content: cairo_content_t, width: c_int, height: c_int, ) -> *mut cairo_surface_t988 pub fn cairo_surface_create_similar( 989 surface: *mut cairo_surface_t, 990 content: cairo_content_t, 991 width: c_int, 992 height: c_int, 993 ) -> *mut cairo_surface_t; cairo_surface_create_for_rectangle( surface: *mut cairo_surface_t, x: c_double, y: c_double, width: c_double, height: c_double, ) -> *mut cairo_surface_t994 pub fn cairo_surface_create_for_rectangle( 995 surface: *mut cairo_surface_t, 996 x: c_double, 997 y: c_double, 998 width: c_double, 999 height: c_double, 1000 ) -> *mut cairo_surface_t; cairo_surface_get_mime_data( surface: *mut cairo_surface_t, mime_type: *const c_char, data: *const *mut u8, length: *mut c_ulong, )1001 pub fn cairo_surface_get_mime_data( 1002 surface: *mut cairo_surface_t, 1003 mime_type: *const c_char, 1004 data: *const *mut u8, 1005 length: *mut c_ulong, 1006 ); cairo_surface_set_mime_data( surface: *mut cairo_surface_t, mime_type: *const c_char, data: *const u8, length: c_ulong, destroy: cairo_destroy_func_t, closure: *const u8, ) -> cairo_status_t1007 pub fn cairo_surface_set_mime_data( 1008 surface: *mut cairo_surface_t, 1009 mime_type: *const c_char, 1010 data: *const u8, 1011 length: c_ulong, 1012 destroy: cairo_destroy_func_t, 1013 closure: *const u8, 1014 ) -> cairo_status_t; cairo_surface_supports_mime_type( surface: *mut cairo_surface_t, mime_type: *const c_char, ) -> cairo_bool_t1015 pub fn cairo_surface_supports_mime_type( 1016 surface: *mut cairo_surface_t, 1017 mime_type: *const c_char, 1018 ) -> cairo_bool_t; cairo_surface_get_device(surface: *mut cairo_surface_t) -> *mut cairo_device_t1019 pub fn cairo_surface_get_device(surface: *mut cairo_surface_t) -> *mut cairo_device_t; cairo_surface_set_device_offset( surface: *mut cairo_surface_t, x_offset: c_double, y_offset: c_double, )1020 pub fn cairo_surface_set_device_offset( 1021 surface: *mut cairo_surface_t, 1022 x_offset: c_double, 1023 y_offset: c_double, 1024 ); cairo_surface_get_device_offset( surface: *mut cairo_surface_t, x_offset: *mut c_double, y_offset: *mut c_double, )1025 pub fn cairo_surface_get_device_offset( 1026 surface: *mut cairo_surface_t, 1027 x_offset: *mut c_double, 1028 y_offset: *mut c_double, 1029 ); cairo_surface_get_device_scale( surface: *mut cairo_surface_t, x_scale: *mut c_double, y_scale: *mut c_double, )1030 pub fn cairo_surface_get_device_scale( 1031 surface: *mut cairo_surface_t, 1032 x_scale: *mut c_double, 1033 y_scale: *mut c_double, 1034 ); cairo_surface_set_device_scale( surface: *mut cairo_surface_t, x_scale: c_double, y_scale: c_double, )1035 pub fn cairo_surface_set_device_scale( 1036 surface: *mut cairo_surface_t, 1037 x_scale: c_double, 1038 y_scale: c_double, 1039 ); cairo_surface_get_fallback_resolution( surface: *mut cairo_surface_t, x_pixels_per_inch: *mut c_double, y_pixels_per_inch: *mut c_double, )1040 pub fn cairo_surface_get_fallback_resolution( 1041 surface: *mut cairo_surface_t, 1042 x_pixels_per_inch: *mut c_double, 1043 y_pixels_per_inch: *mut c_double, 1044 ); cairo_surface_set_fallback_resolution( surface: *mut cairo_surface_t, x_pixels_per_inch: c_double, x_pixels_per_inch: c_double, )1045 pub fn cairo_surface_set_fallback_resolution( 1046 surface: *mut cairo_surface_t, 1047 x_pixels_per_inch: c_double, 1048 x_pixels_per_inch: c_double, 1049 ); cairo_recording_surface_get_extents( surface: *mut cairo_surface_t, extents: *mut cairo_rectangle_t, ) -> cairo_bool_t1050 pub fn cairo_recording_surface_get_extents( 1051 surface: *mut cairo_surface_t, 1052 extents: *mut cairo_rectangle_t, 1053 ) -> cairo_bool_t; cairo_recording_surface_create( content: cairo_content_t, extents: *const cairo_rectangle_t, ) -> *mut cairo_surface_t1054 pub fn cairo_recording_surface_create( 1055 content: cairo_content_t, 1056 extents: *const cairo_rectangle_t, 1057 ) -> *mut cairo_surface_t; cairo_recording_surface_ink_extents( surface: *mut cairo_surface_t, x0: *mut c_double, y0: *mut c_double, width: *mut c_double, height: *mut c_double, )1058 pub fn cairo_recording_surface_ink_extents( 1059 surface: *mut cairo_surface_t, 1060 x0: *mut c_double, 1061 y0: *mut c_double, 1062 width: *mut c_double, 1063 height: *mut c_double, 1064 ); cairo_surface_create_similar_image( other: *mut cairo_surface_t, format: cairo_format_t, width: c_int, height: c_int, ) -> *mut cairo_surface_t1065 pub fn cairo_surface_create_similar_image( 1066 other: *mut cairo_surface_t, 1067 format: cairo_format_t, 1068 width: c_int, 1069 height: c_int, 1070 ) -> *mut cairo_surface_t; cairo_surface_map_to_image( surface: *mut cairo_surface_t, extents: *const cairo_rectangle_int_t, ) -> *mut cairo_surface_t1071 pub fn cairo_surface_map_to_image( 1072 surface: *mut cairo_surface_t, 1073 extents: *const cairo_rectangle_int_t, 1074 ) -> *mut cairo_surface_t; cairo_surface_unmap_image(surface: *mut cairo_surface_t, image: *mut cairo_surface_t)1075 pub fn cairo_surface_unmap_image(surface: *mut cairo_surface_t, image: *mut cairo_surface_t); 1076 1077 // CAIRO IMAGE SURFACE cairo_image_surface_create( format: cairo_format_t, width: c_int, height: c_int, ) -> *mut cairo_surface_t1078 pub fn cairo_image_surface_create( 1079 format: cairo_format_t, 1080 width: c_int, 1081 height: c_int, 1082 ) -> *mut cairo_surface_t; cairo_image_surface_create_for_data( data: *mut u8, format: cairo_format_t, width: c_int, height: c_int, stride: c_int, ) -> *mut cairo_surface_t1083 pub fn cairo_image_surface_create_for_data( 1084 data: *mut u8, 1085 format: cairo_format_t, 1086 width: c_int, 1087 height: c_int, 1088 stride: c_int, 1089 ) -> *mut cairo_surface_t; cairo_image_surface_get_data(surface: *mut cairo_surface_t) -> *mut u81090 pub fn cairo_image_surface_get_data(surface: *mut cairo_surface_t) -> *mut u8; cairo_image_surface_get_format(surface: *mut cairo_surface_t) -> cairo_format_t1091 pub fn cairo_image_surface_get_format(surface: *mut cairo_surface_t) -> cairo_format_t; cairo_image_surface_get_height(surface: *mut cairo_surface_t) -> c_int1092