1pub const MSDFGEN_CUBIC_SEARCH_STARTS: u32 = 4;
4pub const MSDFGEN_CUBIC_SEARCH_STEPS: u32 = 4;
5pub const MSDFGEN_CORNER_DOT_EPSILON: f64 = 0.000001;
6pub const MSDFGEN_DECONVERGENCE_FACTOR: f64 = 0.000001;
7pub const MSDFGEN_EDGE_LENGTH_PRECISION: u32 = 4;
8pub const MSDFGEN_VERSION: &[u8; 4usize] = b"1.9\0";
9#[repr(C)]
10#[derive(Debug, Copy, Clone)]
11pub struct std_allocator {
12 pub _address: u8,
13}
14pub type std_allocator_value_type = u8;
15pub type std_allocator_size_type = u64;
16pub type std_allocator_difference_type = u64;
17pub type std_allocator_pointer = u8;
18pub type std_allocator_const_pointer = u8;
19pub type std_allocator_reference = u8;
20pub type std_allocator_const_reference = u8;
21#[repr(C)]
22#[derive(Debug, Copy, Clone)]
23pub struct std_allocator_rebind {
24 pub _address: u8,
25}
26pub type std_allocator_rebind_other = u8;
27pub type std_allocator_propagate_on_container_move_assignment = u8;
28pub type std_allocator_is_always_equal = u8;
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct std_vector {
32 pub _address: u8,
33}
34pub type std_vector__Base = u8;
35pub type std_vector__Tp_alloc_type = u8;
36pub type std_vector__Alloc_traits = u8;
37pub type std_vector_value_type = u8;
38pub type std_vector_pointer = u8;
39pub type std_vector_const_pointer = u8;
40pub type std_vector_reference = u8;
41pub type std_vector_const_reference = u8;
42pub type std_vector_iterator = u8;
43pub type std_vector_const_iterator = u8;
44pub type std_vector_const_reverse_iterator = u8;
45pub type std_vector_reverse_iterator = u8;
46pub type std_vector_size_type = u64;
47pub type std_vector_difference_type = u64;
48pub type std_vector_allocator_type = u8;
49#[repr(C)]
50#[derive(Debug, Copy, Clone)]
51pub struct std_vector__Temporary_value {
52 pub _address: u8,
53}
54#[repr(C)]
55#[repr(align(1))]
56#[derive(Copy, Clone)]
57pub union std_vector__Temporary_value__Storage {
58 pub _bindgen_opaque_blob: u8,
59}
60pub type __off_t = ::std::os::raw::c_long;
61pub type __off64_t = ::std::os::raw::c_long;
62#[doc = " A 2-dimensional euclidean vector with double precision.\n Implementation based on the Vector2 template from Artery Engine.\n @author Viktor Chlumsky"]
63#[repr(C)]
64#[derive(Debug, Copy, Clone)]
65pub struct msdfgen_Vector2 {
66 pub x: f64,
67 pub y: f64,
68}
69#[test]
70fn bindgen_test_layout_msdfgen_Vector2() {
71 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Vector2> = ::std::mem::MaybeUninit::uninit();
72 let ptr = UNINIT.as_ptr();
73 assert_eq!(
74 ::std::mem::size_of::<msdfgen_Vector2>(),
75 16usize,
76 concat!("Size of: ", stringify!(msdfgen_Vector2))
77 );
78 assert_eq!(
79 ::std::mem::align_of::<msdfgen_Vector2>(),
80 8usize,
81 concat!("Alignment of ", stringify!(msdfgen_Vector2))
82 );
83 assert_eq!(
84 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
85 0usize,
86 concat!(
87 "Offset of field: ",
88 stringify!(msdfgen_Vector2),
89 "::",
90 stringify!(x)
91 )
92 );
93 assert_eq!(
94 unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize },
95 8usize,
96 concat!(
97 "Offset of field: ",
98 stringify!(msdfgen_Vector2),
99 "::",
100 stringify!(y)
101 )
102 );
103}
104extern "C" {
105 #[doc = " Sets the vector to zero."]
106 #[link_name = "\u{1}_ZN7msdfgen7Vector25resetEv"]
107 pub fn msdfgen_Vector2_reset(this: *mut msdfgen_Vector2);
108}
109extern "C" {
110 #[doc = " Sets individual elements of the vector."]
111 #[link_name = "\u{1}_ZN7msdfgen7Vector23setEdd"]
112 pub fn msdfgen_Vector2_set(this: *mut msdfgen_Vector2, x: f64, y: f64);
113}
114extern "C" {
115 #[doc = " Returns the vector's length."]
116 #[link_name = "\u{1}_ZNK7msdfgen7Vector26lengthEv"]
117 pub fn msdfgen_Vector2_length(this: *const msdfgen_Vector2) -> f64;
118}
119extern "C" {
120 #[doc = " Returns the angle of the vector in radians (atan2)."]
121 #[link_name = "\u{1}_ZNK7msdfgen7Vector29directionEv"]
122 pub fn msdfgen_Vector2_direction(this: *const msdfgen_Vector2) -> f64;
123}
124extern "C" {
125 #[doc = " Returns the normalized vector - one that has the same direction but unit length."]
126 #[link_name = "\u{1}_ZNK7msdfgen7Vector29normalizeEb"]
127 pub fn msdfgen_Vector2_normalize(
128 this: *const msdfgen_Vector2,
129 allowZero: bool,
130 ) -> msdfgen_Vector2;
131}
132extern "C" {
133 #[doc = " Returns a vector with the same length that is orthogonal to this one."]
134 #[link_name = "\u{1}_ZNK7msdfgen7Vector213getOrthogonalEb"]
135 pub fn msdfgen_Vector2_getOrthogonal(
136 this: *const msdfgen_Vector2,
137 polarity: bool,
138 ) -> msdfgen_Vector2;
139}
140extern "C" {
141 #[doc = " Returns a vector with unit length that is orthogonal to this one."]
142 #[link_name = "\u{1}_ZNK7msdfgen7Vector214getOrthonormalEbb"]
143 pub fn msdfgen_Vector2_getOrthonormal(
144 this: *const msdfgen_Vector2,
145 polarity: bool,
146 allowZero: bool,
147 ) -> msdfgen_Vector2;
148}
149extern "C" {
150 #[doc = " Returns a vector projected along this one."]
151 #[link_name = "\u{1}_ZNK7msdfgen7Vector27projectERKS0_b"]
152 pub fn msdfgen_Vector2_project(
153 this: *const msdfgen_Vector2,
154 vector: *const msdfgen_Vector2,
155 positive: bool,
156 ) -> msdfgen_Vector2;
157}
158extern "C" {
159 #[link_name = "\u{1}_ZN7msdfgen7Vector2C1Ed"]
160 pub fn msdfgen_Vector2_Vector2(this: *mut msdfgen_Vector2, val: f64);
161}
162extern "C" {
163 #[link_name = "\u{1}_ZN7msdfgen7Vector2C1Edd"]
164 pub fn msdfgen_Vector2_Vector21(this: *mut msdfgen_Vector2, x: f64, y: f64);
165}
166impl msdfgen_Vector2 {
167 #[inline]
168 pub unsafe fn reset(&mut self) {
169 msdfgen_Vector2_reset(self)
170 }
171 #[inline]
172 pub unsafe fn set(&mut self, x: f64, y: f64) {
173 msdfgen_Vector2_set(self, x, y)
174 }
175 #[inline]
176 pub unsafe fn length(&self) -> f64 {
177 msdfgen_Vector2_length(self)
178 }
179 #[inline]
180 pub unsafe fn direction(&self) -> f64 {
181 msdfgen_Vector2_direction(self)
182 }
183 #[inline]
184 pub unsafe fn normalize(&self, allowZero: bool) -> msdfgen_Vector2 {
185 msdfgen_Vector2_normalize(self, allowZero)
186 }
187 #[inline]
188 pub unsafe fn getOrthogonal(&self, polarity: bool) -> msdfgen_Vector2 {
189 msdfgen_Vector2_getOrthogonal(self, polarity)
190 }
191 #[inline]
192 pub unsafe fn getOrthonormal(&self, polarity: bool, allowZero: bool) -> msdfgen_Vector2 {
193 msdfgen_Vector2_getOrthonormal(self, polarity, allowZero)
194 }
195 #[inline]
196 pub unsafe fn project(
197 &self,
198 vector: *const msdfgen_Vector2,
199 positive: bool,
200 ) -> msdfgen_Vector2 {
201 msdfgen_Vector2_project(self, vector, positive)
202 }
203 #[inline]
204 pub unsafe fn new(val: f64) -> Self {
205 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
206 msdfgen_Vector2_Vector2(__bindgen_tmp.as_mut_ptr(), val);
207 __bindgen_tmp.assume_init()
208 }
209 #[inline]
210 pub unsafe fn new1(x: f64, y: f64) -> Self {
211 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
212 msdfgen_Vector2_Vector21(__bindgen_tmp.as_mut_ptr(), x, y);
213 __bindgen_tmp.assume_init()
214 }
215}
216#[doc = " A 2-dimensional euclidean vector with double precision.\n Implementation based on the Vector2 template from Artery Engine.\n @author Viktor Chlumsky"]
217pub type msdfgen_Point2 = msdfgen_Vector2;
218#[doc = " A transformation from shape coordinates to pixel coordinates."]
219#[repr(C)]
220#[derive(Debug, Copy, Clone)]
221pub struct msdfgen_Projection {
222 pub scale: msdfgen_Vector2,
223 pub translate: msdfgen_Vector2,
224}
225#[test]
226fn bindgen_test_layout_msdfgen_Projection() {
227 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Projection> = ::std::mem::MaybeUninit::uninit();
228 let ptr = UNINIT.as_ptr();
229 assert_eq!(
230 ::std::mem::size_of::<msdfgen_Projection>(),
231 32usize,
232 concat!("Size of: ", stringify!(msdfgen_Projection))
233 );
234 assert_eq!(
235 ::std::mem::align_of::<msdfgen_Projection>(),
236 8usize,
237 concat!("Alignment of ", stringify!(msdfgen_Projection))
238 );
239 assert_eq!(
240 unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
241 0usize,
242 concat!(
243 "Offset of field: ",
244 stringify!(msdfgen_Projection),
245 "::",
246 stringify!(scale)
247 )
248 );
249 assert_eq!(
250 unsafe { ::std::ptr::addr_of!((*ptr).translate) as usize - ptr as usize },
251 16usize,
252 concat!(
253 "Offset of field: ",
254 stringify!(msdfgen_Projection),
255 "::",
256 stringify!(translate)
257 )
258 );
259}
260extern "C" {
261 #[doc = " Converts the shape coordinate to pixel coordinate."]
262 #[link_name = "\u{1}_ZNK7msdfgen10Projection7projectERKNS_7Vector2E"]
263 pub fn msdfgen_Projection_project(
264 this: *const msdfgen_Projection,
265 coord: *const msdfgen_Point2,
266 ) -> msdfgen_Point2;
267}
268extern "C" {
269 #[doc = " Converts the pixel coordinate to shape coordinate."]
270 #[link_name = "\u{1}_ZNK7msdfgen10Projection9unprojectERKNS_7Vector2E"]
271 pub fn msdfgen_Projection_unproject(
272 this: *const msdfgen_Projection,
273 coord: *const msdfgen_Point2,
274 ) -> msdfgen_Point2;
275}
276extern "C" {
277 #[doc = " Converts the vector to pixel coordinate space."]
278 #[link_name = "\u{1}_ZNK7msdfgen10Projection13projectVectorERKNS_7Vector2E"]
279 pub fn msdfgen_Projection_projectVector(
280 this: *const msdfgen_Projection,
281 vector: *const msdfgen_Vector2,
282 ) -> msdfgen_Vector2;
283}
284extern "C" {
285 #[doc = " Converts the vector from pixel coordinate space."]
286 #[link_name = "\u{1}_ZNK7msdfgen10Projection15unprojectVectorERKNS_7Vector2E"]
287 pub fn msdfgen_Projection_unprojectVector(
288 this: *const msdfgen_Projection,
289 vector: *const msdfgen_Vector2,
290 ) -> msdfgen_Vector2;
291}
292extern "C" {
293 #[doc = " Converts the X-coordinate from shape to pixel coordinate space."]
294 #[link_name = "\u{1}_ZNK7msdfgen10Projection8projectXEd"]
295 pub fn msdfgen_Projection_projectX(this: *const msdfgen_Projection, x: f64) -> f64;
296}
297extern "C" {
298 #[doc = " Converts the Y-coordinate from shape to pixel coordinate space."]
299 #[link_name = "\u{1}_ZNK7msdfgen10Projection8projectYEd"]
300 pub fn msdfgen_Projection_projectY(this: *const msdfgen_Projection, y: f64) -> f64;
301}
302extern "C" {
303 #[doc = " Converts the X-coordinate from pixel to shape coordinate space."]
304 #[link_name = "\u{1}_ZNK7msdfgen10Projection10unprojectXEd"]
305 pub fn msdfgen_Projection_unprojectX(this: *const msdfgen_Projection, x: f64) -> f64;
306}
307extern "C" {
308 #[doc = " Converts the Y-coordinate from pixel to shape coordinate space."]
309 #[link_name = "\u{1}_ZNK7msdfgen10Projection10unprojectYEd"]
310 pub fn msdfgen_Projection_unprojectY(this: *const msdfgen_Projection, y: f64) -> f64;
311}
312extern "C" {
313 #[link_name = "\u{1}_ZN7msdfgen10ProjectionC1Ev"]
314 pub fn msdfgen_Projection_Projection(this: *mut msdfgen_Projection);
315}
316extern "C" {
317 #[link_name = "\u{1}_ZN7msdfgen10ProjectionC1ERKNS_7Vector2ES3_"]
318 pub fn msdfgen_Projection_Projection1(
319 this: *mut msdfgen_Projection,
320 scale: *const msdfgen_Vector2,
321 translate: *const msdfgen_Vector2,
322 );
323}
324impl msdfgen_Projection {
325 #[inline]
326 pub unsafe fn project(&self, coord: *const msdfgen_Point2) -> msdfgen_Point2 {
327 msdfgen_Projection_project(self, coord)
328 }
329 #[inline]
330 pub unsafe fn unproject(&self, coord: *const msdfgen_Point2) -> msdfgen_Point2 {
331 msdfgen_Projection_unproject(self, coord)
332 }
333 #[inline]
334 pub unsafe fn projectVector(&self, vector: *const msdfgen_Vector2) -> msdfgen_Vector2 {
335 msdfgen_Projection_projectVector(self, vector)
336 }
337 #[inline]
338 pub unsafe fn unprojectVector(&self, vector: *const msdfgen_Vector2) -> msdfgen_Vector2 {
339 msdfgen_Projection_unprojectVector(self, vector)
340 }
341 #[inline]
342 pub unsafe fn projectX(&self, x: f64) -> f64 {
343 msdfgen_Projection_projectX(self, x)
344 }
345 #[inline]
346 pub unsafe fn projectY(&self, y: f64) -> f64 {
347 msdfgen_Projection_projectY(self, y)
348 }
349 #[inline]
350 pub unsafe fn unprojectX(&self, x: f64) -> f64 {
351 msdfgen_Projection_unprojectX(self, x)
352 }
353 #[inline]
354 pub unsafe fn unprojectY(&self, y: f64) -> f64 {
355 msdfgen_Projection_unprojectY(self, y)
356 }
357 #[inline]
358 pub unsafe fn new() -> Self {
359 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
360 msdfgen_Projection_Projection(__bindgen_tmp.as_mut_ptr());
361 __bindgen_tmp.assume_init()
362 }
363 #[inline]
364 pub unsafe fn new1(scale: *const msdfgen_Vector2, translate: *const msdfgen_Vector2) -> Self {
365 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
366 msdfgen_Projection_Projection1(__bindgen_tmp.as_mut_ptr(), scale, translate);
367 __bindgen_tmp.assume_init()
368 }
369}
370pub const msdfgen_FillRule_FILL_NONZERO: msdfgen_FillRule = 0;
371pub const msdfgen_FillRule_FILL_ODD: msdfgen_FillRule = 1;
372pub const msdfgen_FillRule_FILL_POSITIVE: msdfgen_FillRule = 2;
373pub const msdfgen_FillRule_FILL_NEGATIVE: msdfgen_FillRule = 3;
374#[doc = " Fill rule dictates how intersection total is interpreted during rasterization."]
375pub type msdfgen_FillRule = ::std::os::raw::c_uint;
376extern "C" {
377 #[doc = " Resolves the number of intersection into a binary fill value based on fill rule."]
378 #[link_name = "\u{1}_ZN7msdfgen17interpretFillRuleEiNS_8FillRuleE"]
379 pub fn msdfgen_interpretFillRule(
380 intersections: ::std::os::raw::c_int,
381 fillRule: msdfgen_FillRule,
382 ) -> bool;
383}
384#[doc = " Represents a horizontal scanline intersecting a shape."]
385#[repr(C)]
386#[derive(Debug)]
387pub struct msdfgen_Scanline {
388 pub intersections: [u64; 3usize],
389 pub lastIndex: ::std::os::raw::c_int,
390}
391#[doc = " An intersection with the scanline."]
392#[repr(C)]
393#[derive(Debug, Copy, Clone)]
394pub struct msdfgen_Scanline_Intersection {
395 #[doc = " X coordinate."]
396 pub x: f64,
397 #[doc = " Normalized Y direction of the oriented edge at the point of intersection."]
398 pub direction: ::std::os::raw::c_int,
399}
400#[test]
401fn bindgen_test_layout_msdfgen_Scanline_Intersection() {
402 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Scanline_Intersection> =
403 ::std::mem::MaybeUninit::uninit();
404 let ptr = UNINIT.as_ptr();
405 assert_eq!(
406 ::std::mem::size_of::<msdfgen_Scanline_Intersection>(),
407 16usize,
408 concat!("Size of: ", stringify!(msdfgen_Scanline_Intersection))
409 );
410 assert_eq!(
411 ::std::mem::align_of::<msdfgen_Scanline_Intersection>(),
412 8usize,
413 concat!("Alignment of ", stringify!(msdfgen_Scanline_Intersection))
414 );
415 assert_eq!(
416 unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
417 0usize,
418 concat!(
419 "Offset of field: ",
420 stringify!(msdfgen_Scanline_Intersection),
421 "::",
422 stringify!(x)
423 )
424 );
425 assert_eq!(
426 unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize },
427 8usize,
428 concat!(
429 "Offset of field: ",
430 stringify!(msdfgen_Scanline_Intersection),
431 "::",
432 stringify!(direction)
433 )
434 );
435}
436#[test]
437fn bindgen_test_layout_msdfgen_Scanline() {
438 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Scanline> = ::std::mem::MaybeUninit::uninit();
439 let ptr = UNINIT.as_ptr();
440 assert_eq!(
441 ::std::mem::size_of::<msdfgen_Scanline>(),
442 32usize,
443 concat!("Size of: ", stringify!(msdfgen_Scanline))
444 );
445 assert_eq!(
446 ::std::mem::align_of::<msdfgen_Scanline>(),
447 8usize,
448 concat!("Alignment of ", stringify!(msdfgen_Scanline))
449 );
450 assert_eq!(
451 unsafe { ::std::ptr::addr_of!((*ptr).intersections) as usize - ptr as usize },
452 0usize,
453 concat!(
454 "Offset of field: ",
455 stringify!(msdfgen_Scanline),
456 "::",
457 stringify!(intersections)
458 )
459 );
460 assert_eq!(
461 unsafe { ::std::ptr::addr_of!((*ptr).lastIndex) as usize - ptr as usize },
462 24usize,
463 concat!(
464 "Offset of field: ",
465 stringify!(msdfgen_Scanline),
466 "::",
467 stringify!(lastIndex)
468 )
469 );
470}
471extern "C" {
472 #[link_name = "\u{1}_ZN7msdfgen8Scanline7overlapERKS0_S2_ddNS_8FillRuleE"]
473 pub fn msdfgen_Scanline_overlap(
474 a: *const msdfgen_Scanline,
475 b: *const msdfgen_Scanline,
476 xFrom: f64,
477 xTo: f64,
478 fillRule: msdfgen_FillRule,
479 ) -> f64;
480}
481extern "C" {
482 #[doc = " Populates the intersection list."]
483 #[link_name = "\u{1}_ZN7msdfgen8Scanline16setIntersectionsERKSt6vectorINS0_12IntersectionESaIS2_EE"]
484 pub fn msdfgen_Scanline_setIntersections(
485 this: *mut msdfgen_Scanline,
486 intersections: *const [u64; 3usize],
487 );
488}
489extern "C" {
490 #[link_name = "\u{1}_ZN7msdfgen8Scanline16setIntersectionsEOSt6vectorINS0_12IntersectionESaIS2_EE"]
491 pub fn msdfgen_Scanline_setIntersections1(
492 this: *mut msdfgen_Scanline,
493 intersections: *mut [u64; 3usize],
494 );
495}
496extern "C" {
497 #[doc = " Returns the number of intersections left of x."]
498 #[link_name = "\u{1}_ZNK7msdfgen8Scanline18countIntersectionsEd"]
499 pub fn msdfgen_Scanline_countIntersections(
500 this: *const msdfgen_Scanline,
501 x: f64,
502 ) -> ::std::os::raw::c_int;
503}
504extern "C" {
505 #[doc = " Returns the total sign of intersections left of x."]
506 #[link_name = "\u{1}_ZNK7msdfgen8Scanline16sumIntersectionsEd"]
507 pub fn msdfgen_Scanline_sumIntersections(
508 this: *const msdfgen_Scanline,
509 x: f64,
510 ) -> ::std::os::raw::c_int;
511}
512extern "C" {
513 #[doc = " Decides whether the scanline is filled at x based on fill rule."]
514 #[link_name = "\u{1}_ZNK7msdfgen8Scanline6filledEdNS_8FillRuleE"]
515 pub fn msdfgen_Scanline_filled(
516 this: *const msdfgen_Scanline,
517 x: f64,
518 fillRule: msdfgen_FillRule,
519 ) -> bool;
520}
521extern "C" {
522 #[link_name = "\u{1}_ZN7msdfgen8ScanlineC1Ev"]
523 pub fn msdfgen_Scanline_Scanline(this: *mut msdfgen_Scanline);
524}
525impl msdfgen_Scanline {
526 #[inline]
527 pub unsafe fn overlap(
528 a: *const msdfgen_Scanline,
529 b: *const msdfgen_Scanline,
530 xFrom: f64,
531 xTo: f64,
532 fillRule: msdfgen_FillRule,
533 ) -> f64 {
534 msdfgen_Scanline_overlap(a, b, xFrom, xTo, fillRule)
535 }
536 #[inline]
537 pub unsafe fn setIntersections(&mut self, intersections: *const [u64; 3usize]) {
538 msdfgen_Scanline_setIntersections(self, intersections)
539 }
540 #[inline]
541 pub unsafe fn setIntersections1(&mut self, intersections: *mut [u64; 3usize]) {
542 msdfgen_Scanline_setIntersections1(self, intersections)
543 }
544 #[inline]
545 pub unsafe fn countIntersections(&self, x: f64) -> ::std::os::raw::c_int {
546 msdfgen_Scanline_countIntersections(self, x)
547 }
548 #[inline]
549 pub unsafe fn sumIntersections(&self, x: f64) -> ::std::os::raw::c_int {
550 msdfgen_Scanline_sumIntersections(self, x)
551 }
552 #[inline]
553 pub unsafe fn filled(&self, x: f64, fillRule: msdfgen_FillRule) -> bool {
554 msdfgen_Scanline_filled(self, x, fillRule)
555 }
556 #[inline]
557 pub unsafe fn new() -> Self {
558 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
559 msdfgen_Scanline_Scanline(__bindgen_tmp.as_mut_ptr());
560 __bindgen_tmp.assume_init()
561 }
562}
563#[doc = " Represents a signed distance and alignment, which together can be compared to uniquely determine the closest edge segment."]
564#[repr(C)]
565#[derive(Debug, Copy, Clone)]
566pub struct msdfgen_SignedDistance {
567 pub distance: f64,
568 pub dot: f64,
569}
570#[test]
571fn bindgen_test_layout_msdfgen_SignedDistance() {
572 const UNINIT: ::std::mem::MaybeUninit<msdfgen_SignedDistance> =
573 ::std::mem::MaybeUninit::uninit();
574 let ptr = UNINIT.as_ptr();
575 assert_eq!(
576 ::std::mem::size_of::<msdfgen_SignedDistance>(),
577 16usize,
578 concat!("Size of: ", stringify!(msdfgen_SignedDistance))
579 );
580 assert_eq!(
581 ::std::mem::align_of::<msdfgen_SignedDistance>(),
582 8usize,
583 concat!("Alignment of ", stringify!(msdfgen_SignedDistance))
584 );
585 assert_eq!(
586 unsafe { ::std::ptr::addr_of!((*ptr).distance) as usize - ptr as usize },
587 0usize,
588 concat!(
589 "Offset of field: ",
590 stringify!(msdfgen_SignedDistance),
591 "::",
592 stringify!(distance)
593 )
594 );
595 assert_eq!(
596 unsafe { ::std::ptr::addr_of!((*ptr).dot) as usize - ptr as usize },
597 8usize,
598 concat!(
599 "Offset of field: ",
600 stringify!(msdfgen_SignedDistance),
601 "::",
602 stringify!(dot)
603 )
604 );
605}
606extern "C" {
607 #[link_name = "\u{1}_ZN7msdfgen14SignedDistanceC1Ev"]
608 pub fn msdfgen_SignedDistance_SignedDistance(this: *mut msdfgen_SignedDistance);
609}
610extern "C" {
611 #[link_name = "\u{1}_ZN7msdfgen14SignedDistanceC1Edd"]
612 pub fn msdfgen_SignedDistance_SignedDistance1(
613 this: *mut msdfgen_SignedDistance,
614 dist: f64,
615 d: f64,
616 );
617}
618impl msdfgen_SignedDistance {
619 #[inline]
620 pub unsafe fn new() -> Self {
621 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
622 msdfgen_SignedDistance_SignedDistance(__bindgen_tmp.as_mut_ptr());
623 __bindgen_tmp.assume_init()
624 }
625 #[inline]
626 pub unsafe fn new1(dist: f64, d: f64) -> Self {
627 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
628 msdfgen_SignedDistance_SignedDistance1(__bindgen_tmp.as_mut_ptr(), dist, d);
629 __bindgen_tmp.assume_init()
630 }
631}
632pub const msdfgen_EdgeColor_BLACK: msdfgen_EdgeColor = 0;
633pub const msdfgen_EdgeColor_RED: msdfgen_EdgeColor = 1;
634pub const msdfgen_EdgeColor_GREEN: msdfgen_EdgeColor = 2;
635pub const msdfgen_EdgeColor_YELLOW: msdfgen_EdgeColor = 3;
636pub const msdfgen_EdgeColor_BLUE: msdfgen_EdgeColor = 4;
637pub const msdfgen_EdgeColor_MAGENTA: msdfgen_EdgeColor = 5;
638pub const msdfgen_EdgeColor_CYAN: msdfgen_EdgeColor = 6;
639pub const msdfgen_EdgeColor_WHITE: msdfgen_EdgeColor = 7;
640#[doc = " Edge color specifies which color channels an edge belongs to."]
641pub type msdfgen_EdgeColor = ::std::os::raw::c_uint;
642#[repr(C)]
643pub struct msdfgen_EdgeSegment__bindgen_vtable(::std::os::raw::c_void);
644#[doc = " An abstract edge segment."]
645#[repr(C)]
646#[derive(Debug)]
647pub struct msdfgen_EdgeSegment {
648 pub vtable_: *const msdfgen_EdgeSegment__bindgen_vtable,
649 pub color: msdfgen_EdgeColor,
650}
651#[test]
652fn bindgen_test_layout_msdfgen_EdgeSegment() {
653 const UNINIT: ::std::mem::MaybeUninit<msdfgen_EdgeSegment> = ::std::mem::MaybeUninit::uninit();
654 let ptr = UNINIT.as_ptr();
655 assert_eq!(
656 ::std::mem::size_of::<msdfgen_EdgeSegment>(),
657 16usize,
658 concat!("Size of: ", stringify!(msdfgen_EdgeSegment))
659 );
660 assert_eq!(
661 ::std::mem::align_of::<msdfgen_EdgeSegment>(),
662 8usize,
663 concat!("Alignment of ", stringify!(msdfgen_EdgeSegment))
664 );
665 assert_eq!(
666 unsafe { ::std::ptr::addr_of!((*ptr).color) as usize - ptr as usize },
667 8usize,
668 concat!(
669 "Offset of field: ",
670 stringify!(msdfgen_EdgeSegment),
671 "::",
672 stringify!(color)
673 )
674 );
675}
676extern "C" {
677 #[doc = " Converts a previously retrieved signed distance from origin to pseudo-distance."]
678 #[link_name = "\u{1}_ZNK7msdfgen11EdgeSegment24distanceToPseudoDistanceERNS_14SignedDistanceENS_7Vector2Ed"]
679 pub fn msdfgen_EdgeSegment_distanceToPseudoDistance(
680 this: *mut ::std::os::raw::c_void,
681 distance: *mut msdfgen_SignedDistance,
682 origin: msdfgen_Point2,
683 param: f64,
684 );
685}
686#[doc = " A line segment."]
687#[repr(C)]
688#[derive(Debug)]
689pub struct msdfgen_LinearSegment {
690 pub _base: msdfgen_EdgeSegment,
691 pub p: [msdfgen_Point2; 2usize],
692}
693#[test]
694fn bindgen_test_layout_msdfgen_LinearSegment() {
695 const UNINIT: ::std::mem::MaybeUninit<msdfgen_LinearSegment> =
696 ::std::mem::MaybeUninit::uninit();
697 let ptr = UNINIT.as_ptr();
698 assert_eq!(
699 ::std::mem::size_of::<msdfgen_LinearSegment>(),
700 48usize,
701 concat!("Size of: ", stringify!(msdfgen_LinearSegment))
702 );
703 assert_eq!(
704 ::std::mem::align_of::<msdfgen_LinearSegment>(),
705 8usize,
706 concat!("Alignment of ", stringify!(msdfgen_LinearSegment))
707 );
708 assert_eq!(
709 unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
710 16usize,
711 concat!(
712 "Offset of field: ",
713 stringify!(msdfgen_LinearSegment),
714 "::",
715 stringify!(p)
716 )
717 );
718}
719extern "C" {
720 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment6lengthEv"]
721 pub fn msdfgen_LinearSegment_length(this: *const msdfgen_LinearSegment) -> f64;
722}
723extern "C" {
724 #[link_name = "\u{1}_ZN7msdfgen13LinearSegmentC1ENS_7Vector2ES1_NS_9EdgeColorE"]
725 pub fn msdfgen_LinearSegment_LinearSegment(
726 this: *mut msdfgen_LinearSegment,
727 p0: msdfgen_Point2,
728 p1: msdfgen_Point2,
729 edgeColor: msdfgen_EdgeColor,
730 );
731}
732impl msdfgen_LinearSegment {
733 #[inline]
734 pub unsafe fn length(&self) -> f64 {
735 msdfgen_LinearSegment_length(self)
736 }
737 #[inline]
738 pub unsafe fn new(
739 p0: msdfgen_Point2,
740 p1: msdfgen_Point2,
741 edgeColor: msdfgen_EdgeColor,
742 ) -> Self {
743 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
744 msdfgen_LinearSegment_LinearSegment(__bindgen_tmp.as_mut_ptr(), p0, p1, edgeColor);
745 __bindgen_tmp.assume_init()
746 }
747}
748extern "C" {
749 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment5cloneEv"]
750 pub fn msdfgen_LinearSegment_clone(
751 this: *mut ::std::os::raw::c_void,
752 ) -> *mut msdfgen_LinearSegment;
753}
754extern "C" {
755 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment5pointEd"]
756 pub fn msdfgen_LinearSegment_point(
757 this: *mut ::std::os::raw::c_void,
758 param: f64,
759 ) -> msdfgen_Point2;
760}
761extern "C" {
762 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment9directionEd"]
763 pub fn msdfgen_LinearSegment_direction(
764 this: *mut ::std::os::raw::c_void,
765 param: f64,
766 ) -> msdfgen_Vector2;
767}
768extern "C" {
769 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment15directionChangeEd"]
770 pub fn msdfgen_LinearSegment_directionChange(
771 this: *mut ::std::os::raw::c_void,
772 param: f64,
773 ) -> msdfgen_Vector2;
774}
775extern "C" {
776 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment14signedDistanceENS_7Vector2ERd"]
777 pub fn msdfgen_LinearSegment_signedDistance(
778 this: *mut ::std::os::raw::c_void,
779 origin: msdfgen_Point2,
780 param: *mut f64,
781 ) -> msdfgen_SignedDistance;
782}
783extern "C" {
784 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment21scanlineIntersectionsEPdPid"]
785 pub fn msdfgen_LinearSegment_scanlineIntersections(
786 this: *mut ::std::os::raw::c_void,
787 x: *mut f64,
788 dy: *mut ::std::os::raw::c_int,
789 y: f64,
790 ) -> ::std::os::raw::c_int;
791}
792extern "C" {
793 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment5boundERdS1_S1_S1_"]
794 pub fn msdfgen_LinearSegment_bound(
795 this: *mut ::std::os::raw::c_void,
796 l: *mut f64,
797 b: *mut f64,
798 r: *mut f64,
799 t: *mut f64,
800 );
801}
802extern "C" {
803 #[link_name = "\u{1}_ZN7msdfgen13LinearSegment7reverseEv"]
804 pub fn msdfgen_LinearSegment_reverse(this: *mut ::std::os::raw::c_void);
805}
806extern "C" {
807 #[link_name = "\u{1}_ZN7msdfgen13LinearSegment14moveStartPointENS_7Vector2E"]
808 pub fn msdfgen_LinearSegment_moveStartPoint(
809 this: *mut ::std::os::raw::c_void,
810 to: msdfgen_Point2,
811 );
812}
813extern "C" {
814 #[link_name = "\u{1}_ZN7msdfgen13LinearSegment12moveEndPointENS_7Vector2E"]
815 pub fn msdfgen_LinearSegment_moveEndPoint(
816 this: *mut ::std::os::raw::c_void,
817 to: msdfgen_Point2,
818 );
819}
820extern "C" {
821 #[link_name = "\u{1}_ZNK7msdfgen13LinearSegment13splitInThirdsERPNS_11EdgeSegmentES3_S3_"]
822 pub fn msdfgen_LinearSegment_splitInThirds(
823 this: *mut ::std::os::raw::c_void,
824 part1: *mut *mut msdfgen_EdgeSegment,
825 part2: *mut *mut msdfgen_EdgeSegment,
826 part3: *mut *mut msdfgen_EdgeSegment,
827 );
828}
829#[doc = " A quadratic Bezier curve."]
830#[repr(C)]
831#[derive(Debug)]
832pub struct msdfgen_QuadraticSegment {
833 pub _base: msdfgen_EdgeSegment,
834 pub p: [msdfgen_Point2; 3usize],
835}
836#[test]
837fn bindgen_test_layout_msdfgen_QuadraticSegment() {
838 const UNINIT: ::std::mem::MaybeUninit<msdfgen_QuadraticSegment> =
839 ::std::mem::MaybeUninit::uninit();
840 let ptr = UNINIT.as_ptr();
841 assert_eq!(
842 ::std::mem::size_of::<msdfgen_QuadraticSegment>(),
843 64usize,
844 concat!("Size of: ", stringify!(msdfgen_QuadraticSegment))
845 );
846 assert_eq!(
847 ::std::mem::align_of::<msdfgen_QuadraticSegment>(),
848 8usize,
849 concat!("Alignment of ", stringify!(msdfgen_QuadraticSegment))
850 );
851 assert_eq!(
852 unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
853 16usize,
854 concat!(
855 "Offset of field: ",
856 stringify!(msdfgen_QuadraticSegment),
857 "::",
858 stringify!(p)
859 )
860 );
861}
862extern "C" {
863 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment6lengthEv"]
864 pub fn msdfgen_QuadraticSegment_length(this: *const msdfgen_QuadraticSegment) -> f64;
865}
866extern "C" {
867 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment14convertToCubicEv"]
868 pub fn msdfgen_QuadraticSegment_convertToCubic(
869 this: *const msdfgen_QuadraticSegment,
870 ) -> *mut msdfgen_EdgeSegment;
871}
872extern "C" {
873 #[link_name = "\u{1}_ZN7msdfgen16QuadraticSegmentC1ENS_7Vector2ES1_S1_NS_9EdgeColorE"]
874 pub fn msdfgen_QuadraticSegment_QuadraticSegment(
875 this: *mut msdfgen_QuadraticSegment,
876 p0: msdfgen_Point2,
877 p1: msdfgen_Point2,
878 p2: msdfgen_Point2,
879 edgeColor: msdfgen_EdgeColor,
880 );
881}
882impl msdfgen_QuadraticSegment {
883 #[inline]
884 pub unsafe fn length(&self) -> f64 {
885 msdfgen_QuadraticSegment_length(self)
886 }
887 #[inline]
888 pub unsafe fn convertToCubic(&self) -> *mut msdfgen_EdgeSegment {
889 msdfgen_QuadraticSegment_convertToCubic(self)
890 }
891 #[inline]
892 pub unsafe fn new(
893 p0: msdfgen_Point2,
894 p1: msdfgen_Point2,
895 p2: msdfgen_Point2,
896 edgeColor: msdfgen_EdgeColor,
897 ) -> Self {
898 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
899 msdfgen_QuadraticSegment_QuadraticSegment(
900 __bindgen_tmp.as_mut_ptr(),
901 p0,
902 p1,
903 p2,
904 edgeColor,
905 );
906 __bindgen_tmp.assume_init()
907 }
908}
909extern "C" {
910 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment5cloneEv"]
911 pub fn msdfgen_QuadraticSegment_clone(
912 this: *mut ::std::os::raw::c_void,
913 ) -> *mut msdfgen_QuadraticSegment;
914}
915extern "C" {
916 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment5pointEd"]
917 pub fn msdfgen_QuadraticSegment_point(
918 this: *mut ::std::os::raw::c_void,
919 param: f64,
920 ) -> msdfgen_Point2;
921}
922extern "C" {
923 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment9directionEd"]
924 pub fn msdfgen_QuadraticSegment_direction(
925 this: *mut ::std::os::raw::c_void,
926 param: f64,
927 ) -> msdfgen_Vector2;
928}
929extern "C" {
930 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment15directionChangeEd"]
931 pub fn msdfgen_QuadraticSegment_directionChange(
932 this: *mut ::std::os::raw::c_void,
933 param: f64,
934 ) -> msdfgen_Vector2;
935}
936extern "C" {
937 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment14signedDistanceENS_7Vector2ERd"]
938 pub fn msdfgen_QuadraticSegment_signedDistance(
939 this: *mut ::std::os::raw::c_void,
940 origin: msdfgen_Point2,
941 param: *mut f64,
942 ) -> msdfgen_SignedDistance;
943}
944extern "C" {
945 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment21scanlineIntersectionsEPdPid"]
946 pub fn msdfgen_QuadraticSegment_scanlineIntersections(
947 this: *mut ::std::os::raw::c_void,
948 x: *mut f64,
949 dy: *mut ::std::os::raw::c_int,
950 y: f64,
951 ) -> ::std::os::raw::c_int;
952}
953extern "C" {
954 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment5boundERdS1_S1_S1_"]
955 pub fn msdfgen_QuadraticSegment_bound(
956 this: *mut ::std::os::raw::c_void,
957 l: *mut f64,
958 b: *mut f64,
959 r: *mut f64,
960 t: *mut f64,
961 );
962}
963extern "C" {
964 #[link_name = "\u{1}_ZN7msdfgen16QuadraticSegment7reverseEv"]
965 pub fn msdfgen_QuadraticSegment_reverse(this: *mut ::std::os::raw::c_void);
966}
967extern "C" {
968 #[link_name = "\u{1}_ZN7msdfgen16QuadraticSegment14moveStartPointENS_7Vector2E"]
969 pub fn msdfgen_QuadraticSegment_moveStartPoint(
970 this: *mut ::std::os::raw::c_void,
971 to: msdfgen_Point2,
972 );
973}
974extern "C" {
975 #[link_name = "\u{1}_ZN7msdfgen16QuadraticSegment12moveEndPointENS_7Vector2E"]
976 pub fn msdfgen_QuadraticSegment_moveEndPoint(
977 this: *mut ::std::os::raw::c_void,
978 to: msdfgen_Point2,
979 );
980}
981extern "C" {
982 #[link_name = "\u{1}_ZNK7msdfgen16QuadraticSegment13splitInThirdsERPNS_11EdgeSegmentES3_S3_"]
983 pub fn msdfgen_QuadraticSegment_splitInThirds(
984 this: *mut ::std::os::raw::c_void,
985 part1: *mut *mut msdfgen_EdgeSegment,
986 part2: *mut *mut msdfgen_EdgeSegment,
987 part3: *mut *mut msdfgen_EdgeSegment,
988 );
989}
990#[doc = " A cubic Bezier curve."]
991#[repr(C)]
992#[derive(Debug)]
993pub struct msdfgen_CubicSegment {
994 pub _base: msdfgen_EdgeSegment,
995 pub p: [msdfgen_Point2; 4usize],
996}
997#[test]
998fn bindgen_test_layout_msdfgen_CubicSegment() {
999 const UNINIT: ::std::mem::MaybeUninit<msdfgen_CubicSegment> = ::std::mem::MaybeUninit::uninit();
1000 let ptr = UNINIT.as_ptr();
1001 assert_eq!(
1002 ::std::mem::size_of::<msdfgen_CubicSegment>(),
1003 80usize,
1004 concat!("Size of: ", stringify!(msdfgen_CubicSegment))
1005 );
1006 assert_eq!(
1007 ::std::mem::align_of::<msdfgen_CubicSegment>(),
1008 8usize,
1009 concat!("Alignment of ", stringify!(msdfgen_CubicSegment))
1010 );
1011 assert_eq!(
1012 unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
1013 16usize,
1014 concat!(
1015 "Offset of field: ",
1016 stringify!(msdfgen_CubicSegment),
1017 "::",
1018 stringify!(p)
1019 )
1020 );
1021}
1022extern "C" {
1023 #[link_name = "\u{1}_ZN7msdfgen12CubicSegment10deconvergeEid"]
1024 pub fn msdfgen_CubicSegment_deconverge(
1025 this: *mut msdfgen_CubicSegment,
1026 param: ::std::os::raw::c_int,
1027 amount: f64,
1028 );
1029}
1030extern "C" {
1031 #[link_name = "\u{1}_ZN7msdfgen12CubicSegmentC1ENS_7Vector2ES1_S1_S1_NS_9EdgeColorE"]
1032 pub fn msdfgen_CubicSegment_CubicSegment(
1033 this: *mut msdfgen_CubicSegment,
1034 p0: msdfgen_Point2,
1035 p1: msdfgen_Point2,
1036 p2: msdfgen_Point2,
1037 p3: msdfgen_Point2,
1038 edgeColor: msdfgen_EdgeColor,
1039 );
1040}
1041impl msdfgen_CubicSegment {
1042 #[inline]
1043 pub unsafe fn deconverge(&mut self, param: ::std::os::raw::c_int, amount: f64) {
1044 msdfgen_CubicSegment_deconverge(self, param, amount)
1045 }
1046 #[inline]
1047 pub unsafe fn new(
1048 p0: msdfgen_Point2,
1049 p1: msdfgen_Point2,
1050 p2: msdfgen_Point2,
1051 p3: msdfgen_Point2,
1052 edgeColor: msdfgen_EdgeColor,
1053 ) -> Self {
1054 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1055 msdfgen_CubicSegment_CubicSegment(__bindgen_tmp.as_mut_ptr(), p0, p1, p2, p3, edgeColor);
1056 __bindgen_tmp.assume_init()
1057 }
1058}
1059extern "C" {
1060 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment5cloneEv"]
1061 pub fn msdfgen_CubicSegment_clone(
1062 this: *mut ::std::os::raw::c_void,
1063 ) -> *mut msdfgen_CubicSegment;
1064}
1065extern "C" {
1066 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment5pointEd"]
1067 pub fn msdfgen_CubicSegment_point(
1068 this: *mut ::std::os::raw::c_void,
1069 param: f64,
1070 ) -> msdfgen_Point2;
1071}
1072extern "C" {
1073 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment9directionEd"]
1074 pub fn msdfgen_CubicSegment_direction(
1075 this: *mut ::std::os::raw::c_void,
1076 param: f64,
1077 ) -> msdfgen_Vector2;
1078}
1079extern "C" {
1080 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment15directionChangeEd"]
1081 pub fn msdfgen_CubicSegment_directionChange(
1082 this: *mut ::std::os::raw::c_void,
1083 param: f64,
1084 ) -> msdfgen_Vector2;
1085}
1086extern "C" {
1087 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment14signedDistanceENS_7Vector2ERd"]
1088 pub fn msdfgen_CubicSegment_signedDistance(
1089 this: *mut ::std::os::raw::c_void,
1090 origin: msdfgen_Point2,
1091 param: *mut f64,
1092 ) -> msdfgen_SignedDistance;
1093}
1094extern "C" {
1095 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment21scanlineIntersectionsEPdPid"]
1096 pub fn msdfgen_CubicSegment_scanlineIntersections(
1097 this: *mut ::std::os::raw::c_void,
1098 x: *mut f64,
1099 dy: *mut ::std::os::raw::c_int,
1100 y: f64,
1101 ) -> ::std::os::raw::c_int;
1102}
1103extern "C" {
1104 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment5boundERdS1_S1_S1_"]
1105 pub fn msdfgen_CubicSegment_bound(
1106 this: *mut ::std::os::raw::c_void,
1107 l: *mut f64,
1108 b: *mut f64,
1109 r: *mut f64,
1110 t: *mut f64,
1111 );
1112}
1113extern "C" {
1114 #[link_name = "\u{1}_ZN7msdfgen12CubicSegment7reverseEv"]
1115 pub fn msdfgen_CubicSegment_reverse(this: *mut ::std::os::raw::c_void);
1116}
1117extern "C" {
1118 #[link_name = "\u{1}_ZN7msdfgen12CubicSegment14moveStartPointENS_7Vector2E"]
1119 pub fn msdfgen_CubicSegment_moveStartPoint(
1120 this: *mut ::std::os::raw::c_void,
1121 to: msdfgen_Point2,
1122 );
1123}
1124extern "C" {
1125 #[link_name = "\u{1}_ZN7msdfgen12CubicSegment12moveEndPointENS_7Vector2E"]
1126 pub fn msdfgen_CubicSegment_moveEndPoint(this: *mut ::std::os::raw::c_void, to: msdfgen_Point2);
1127}
1128extern "C" {
1129 #[link_name = "\u{1}_ZNK7msdfgen12CubicSegment13splitInThirdsERPNS_11EdgeSegmentES3_S3_"]
1130 pub fn msdfgen_CubicSegment_splitInThirds(
1131 this: *mut ::std::os::raw::c_void,
1132 part1: *mut *mut msdfgen_EdgeSegment,
1133 part2: *mut *mut msdfgen_EdgeSegment,
1134 part3: *mut *mut msdfgen_EdgeSegment,
1135 );
1136}
1137#[doc = " Container for a single edge of dynamic type."]
1138#[repr(C)]
1139#[derive(Debug)]
1140pub struct msdfgen_EdgeHolder {
1141 pub edgeSegment: *mut msdfgen_EdgeSegment,
1142}
1143#[test]
1144fn bindgen_test_layout_msdfgen_EdgeHolder() {
1145 const UNINIT: ::std::mem::MaybeUninit<msdfgen_EdgeHolder> = ::std::mem::MaybeUninit::uninit();
1146 let ptr = UNINIT.as_ptr();
1147 assert_eq!(
1148 ::std::mem::size_of::<msdfgen_EdgeHolder>(),
1149 8usize,
1150 concat!("Size of: ", stringify!(msdfgen_EdgeHolder))
1151 );
1152 assert_eq!(
1153 ::std::mem::align_of::<msdfgen_EdgeHolder>(),
1154 8usize,
1155 concat!("Alignment of ", stringify!(msdfgen_EdgeHolder))
1156 );
1157 assert_eq!(
1158 unsafe { ::std::ptr::addr_of!((*ptr).edgeSegment) as usize - ptr as usize },
1159 0usize,
1160 concat!(
1161 "Offset of field: ",
1162 stringify!(msdfgen_EdgeHolder),
1163 "::",
1164 stringify!(edgeSegment)
1165 )
1166 );
1167}
1168extern "C" {
1169 #[doc = " Swaps the edges held by a and b."]
1170 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolder4swapERS0_S1_"]
1171 pub fn msdfgen_EdgeHolder_swap(a: *mut msdfgen_EdgeHolder, b: *mut msdfgen_EdgeHolder);
1172}
1173extern "C" {
1174 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1Ev"]
1175 pub fn msdfgen_EdgeHolder_EdgeHolder(this: *mut msdfgen_EdgeHolder);
1176}
1177extern "C" {
1178 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1EPNS_11EdgeSegmentE"]
1179 pub fn msdfgen_EdgeHolder_EdgeHolder1(
1180 this: *mut msdfgen_EdgeHolder,
1181 segment: *mut msdfgen_EdgeSegment,
1182 );
1183}
1184extern "C" {
1185 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1ENS_7Vector2ES1_NS_9EdgeColorE"]
1186 pub fn msdfgen_EdgeHolder_EdgeHolder2(
1187 this: *mut msdfgen_EdgeHolder,
1188 p0: msdfgen_Point2,
1189 p1: msdfgen_Point2,
1190 edgeColor: msdfgen_EdgeColor,
1191 );
1192}
1193extern "C" {
1194 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1ENS_7Vector2ES1_S1_NS_9EdgeColorE"]
1195 pub fn msdfgen_EdgeHolder_EdgeHolder3(
1196 this: *mut msdfgen_EdgeHolder,
1197 p0: msdfgen_Point2,
1198 p1: msdfgen_Point2,
1199 p2: msdfgen_Point2,
1200 edgeColor: msdfgen_EdgeColor,
1201 );
1202}
1203extern "C" {
1204 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1ENS_7Vector2ES1_S1_S1_NS_9EdgeColorE"]
1205 pub fn msdfgen_EdgeHolder_EdgeHolder4(
1206 this: *mut msdfgen_EdgeHolder,
1207 p0: msdfgen_Point2,
1208 p1: msdfgen_Point2,
1209 p2: msdfgen_Point2,
1210 p3: msdfgen_Point2,
1211 edgeColor: msdfgen_EdgeColor,
1212 );
1213}
1214extern "C" {
1215 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1ERKS0_"]
1216 pub fn msdfgen_EdgeHolder_EdgeHolder5(
1217 this: *mut msdfgen_EdgeHolder,
1218 orig: *const msdfgen_EdgeHolder,
1219 );
1220}
1221extern "C" {
1222 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderC1EOS0_"]
1223 pub fn msdfgen_EdgeHolder_EdgeHolder6(
1224 this: *mut msdfgen_EdgeHolder,
1225 orig: *mut msdfgen_EdgeHolder,
1226 );
1227}
1228extern "C" {
1229 #[link_name = "\u{1}_ZN7msdfgen10EdgeHolderD1Ev"]
1230 pub fn msdfgen_EdgeHolder_EdgeHolder_destructor(this: *mut msdfgen_EdgeHolder);
1231}
1232impl msdfgen_EdgeHolder {
1233 #[inline]
1234 pub unsafe fn swap(a: *mut msdfgen_EdgeHolder, b: *mut msdfgen_EdgeHolder) {
1235 msdfgen_EdgeHolder_swap(a, b)
1236 }
1237 #[inline]
1238 pub unsafe fn new() -> Self {
1239 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1240 msdfgen_EdgeHolder_EdgeHolder(__bindgen_tmp.as_mut_ptr());
1241 __bindgen_tmp.assume_init()
1242 }
1243 #[inline]
1244 pub unsafe fn new1(segment: *mut msdfgen_EdgeSegment) -> Self {
1245 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1246 msdfgen_EdgeHolder_EdgeHolder1(__bindgen_tmp.as_mut_ptr(), segment);
1247 __bindgen_tmp.assume_init()
1248 }
1249 #[inline]
1250 pub unsafe fn new2(
1251 p0: msdfgen_Point2,
1252 p1: msdfgen_Point2,
1253 edgeColor: msdfgen_EdgeColor,
1254 ) -> Self {
1255 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1256 msdfgen_EdgeHolder_EdgeHolder2(__bindgen_tmp.as_mut_ptr(), p0, p1, edgeColor);
1257 __bindgen_tmp.assume_init()
1258 }
1259 #[inline]
1260 pub unsafe fn new3(
1261 p0: msdfgen_Point2,
1262 p1: msdfgen_Point2,
1263 p2: msdfgen_Point2,
1264 edgeColor: msdfgen_EdgeColor,
1265 ) -> Self {
1266 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1267 msdfgen_EdgeHolder_EdgeHolder3(__bindgen_tmp.as_mut_ptr(), p0, p1, p2, edgeColor);
1268 __bindgen_tmp.assume_init()
1269 }
1270 #[inline]
1271 pub unsafe fn new4(
1272 p0: msdfgen_Point2,
1273 p1: msdfgen_Point2,
1274 p2: msdfgen_Point2,
1275 p3: msdfgen_Point2,
1276 edgeColor: msdfgen_EdgeColor,
1277 ) -> Self {
1278 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1279 msdfgen_EdgeHolder_EdgeHolder4(__bindgen_tmp.as_mut_ptr(), p0, p1, p2, p3, edgeColor);
1280 __bindgen_tmp.assume_init()
1281 }
1282 #[inline]
1283 pub unsafe fn new5(orig: *const msdfgen_EdgeHolder) -> Self {
1284 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1285 msdfgen_EdgeHolder_EdgeHolder5(__bindgen_tmp.as_mut_ptr(), orig);
1286 __bindgen_tmp.assume_init()
1287 }
1288 #[inline]
1289 pub unsafe fn new6(orig: *mut msdfgen_EdgeHolder) -> Self {
1290 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1291 msdfgen_EdgeHolder_EdgeHolder6(__bindgen_tmp.as_mut_ptr(), orig);
1292 __bindgen_tmp.assume_init()
1293 }
1294 #[inline]
1295 pub unsafe fn destruct(&mut self) {
1296 msdfgen_EdgeHolder_EdgeHolder_destructor(self)
1297 }
1298}
1299#[doc = " A single closed contour of a shape."]
1300#[repr(C)]
1301#[derive(Debug)]
1302pub struct msdfgen_Contour {
1303 #[doc = " The sequence of edges that make up the contour."]
1304 pub edges: [u64; 3usize],
1305}
1306#[test]
1307fn bindgen_test_layout_msdfgen_Contour() {
1308 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Contour> = ::std::mem::MaybeUninit::uninit();
1309 let ptr = UNINIT.as_ptr();
1310 assert_eq!(
1311 ::std::mem::size_of::<msdfgen_Contour>(),
1312 24usize,
1313 concat!("Size of: ", stringify!(msdfgen_Contour))
1314 );
1315 assert_eq!(
1316 ::std::mem::align_of::<msdfgen_Contour>(),
1317 8usize,
1318 concat!("Alignment of ", stringify!(msdfgen_Contour))
1319 );
1320 assert_eq!(
1321 unsafe { ::std::ptr::addr_of!((*ptr).edges) as usize - ptr as usize },
1322 0usize,
1323 concat!(
1324 "Offset of field: ",
1325 stringify!(msdfgen_Contour),
1326 "::",
1327 stringify!(edges)
1328 )
1329 );
1330}
1331extern "C" {
1332 #[doc = " Adds an edge to the contour."]
1333 #[link_name = "\u{1}_ZN7msdfgen7Contour7addEdgeERKNS_10EdgeHolderE"]
1334 pub fn msdfgen_Contour_addEdge(this: *mut msdfgen_Contour, edge: *const msdfgen_EdgeHolder);
1335}
1336extern "C" {
1337 #[link_name = "\u{1}_ZN7msdfgen7Contour7addEdgeEONS_10EdgeHolderE"]
1338 pub fn msdfgen_Contour_addEdge1(this: *mut msdfgen_Contour, edge: *mut msdfgen_EdgeHolder);
1339}
1340extern "C" {
1341 #[doc = " Creates a new edge in the contour and returns its reference."]
1342 #[link_name = "\u{1}_ZN7msdfgen7Contour7addEdgeEv"]
1343 pub fn msdfgen_Contour_addEdge2(this: *mut msdfgen_Contour) -> *mut msdfgen_EdgeHolder;
1344}
1345extern "C" {
1346 #[doc = " Adjusts the bounding box to fit the contour."]
1347 #[link_name = "\u{1}_ZNK7msdfgen7Contour5boundERdS1_S1_S1_"]
1348 pub fn msdfgen_Contour_bound(
1349 this: *const msdfgen_Contour,
1350 l: *mut f64,
1351 b: *mut f64,
1352 r: *mut f64,
1353 t: *mut f64,
1354 );
1355}
1356extern "C" {
1357 #[doc = " Adjusts the bounding box to fit the contour border's mitered corners."]
1358 #[link_name = "\u{1}_ZNK7msdfgen7Contour11boundMitersERdS1_S1_S1_ddi"]
1359 pub fn msdfgen_Contour_boundMiters(
1360 this: *const msdfgen_Contour,
1361 l: *mut f64,
1362 b: *mut f64,
1363 r: *mut f64,
1364 t: *mut f64,
1365 border: f64,
1366 miterLimit: f64,
1367 polarity: ::std::os::raw::c_int,
1368 );
1369}
1370extern "C" {
1371 #[doc = " Computes the winding of the contour. Returns 1 if positive, -1 if negative."]
1372 #[link_name = "\u{1}_ZNK7msdfgen7Contour7windingEv"]
1373 pub fn msdfgen_Contour_winding(this: *const msdfgen_Contour) -> ::std::os::raw::c_int;
1374}
1375extern "C" {
1376 #[doc = " Reverses the sequence of edges on the contour."]
1377 #[link_name = "\u{1}_ZN7msdfgen7Contour7reverseEv"]
1378 pub fn msdfgen_Contour_reverse(this: *mut msdfgen_Contour);
1379}
1380impl msdfgen_Contour {
1381 #[inline]
1382 pub unsafe fn addEdge(&mut self, edge: *const msdfgen_EdgeHolder) {
1383 msdfgen_Contour_addEdge(self, edge)
1384 }
1385 #[inline]
1386 pub unsafe fn addEdge1(&mut self, edge: *mut msdfgen_EdgeHolder) {
1387 msdfgen_Contour_addEdge1(self, edge)
1388 }
1389 #[inline]
1390 pub unsafe fn addEdge2(&mut self) -> *mut msdfgen_EdgeHolder {
1391 msdfgen_Contour_addEdge2(self)
1392 }
1393 #[inline]
1394 pub unsafe fn bound(&self, l: *mut f64, b: *mut f64, r: *mut f64, t: *mut f64) {
1395 msdfgen_Contour_bound(self, l, b, r, t)
1396 }
1397 #[inline]
1398 pub unsafe fn boundMiters(
1399 &self,
1400 l: *mut f64,
1401 b: *mut f64,
1402 r: *mut f64,
1403 t: *mut f64,
1404 border: f64,
1405 miterLimit: f64,
1406 polarity: ::std::os::raw::c_int,
1407 ) {
1408 msdfgen_Contour_boundMiters(self, l, b, r, t, border, miterLimit, polarity)
1409 }
1410 #[inline]
1411 pub unsafe fn winding(&self) -> ::std::os::raw::c_int {
1412 msdfgen_Contour_winding(self)
1413 }
1414 #[inline]
1415 pub unsafe fn reverse(&mut self) {
1416 msdfgen_Contour_reverse(self)
1417 }
1418}
1419#[doc = " Vector shape representation."]
1420#[repr(C)]
1421#[derive(Debug)]
1422pub struct msdfgen_Shape {
1423 #[doc = " The list of contours the shape consists of."]
1424 pub contours: [u64; 3usize],
1425 #[doc = " Specifies whether the shape uses bottom-to-top (false) or top-to-bottom (true) Y coordinates."]
1426 pub inverseYAxis: bool,
1427}
1428#[repr(C)]
1429#[derive(Debug, Copy, Clone)]
1430pub struct msdfgen_Shape_Bounds {
1431 pub l: f64,
1432 pub b: f64,
1433 pub r: f64,
1434 pub t: f64,
1435}
1436#[test]
1437fn bindgen_test_layout_msdfgen_Shape_Bounds() {
1438 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Shape_Bounds> = ::std::mem::MaybeUninit::uninit();
1439 let ptr = UNINIT.as_ptr();
1440 assert_eq!(
1441 ::std::mem::size_of::<msdfgen_Shape_Bounds>(),
1442 32usize,
1443 concat!("Size of: ", stringify!(msdfgen_Shape_Bounds))
1444 );
1445 assert_eq!(
1446 ::std::mem::align_of::<msdfgen_Shape_Bounds>(),
1447 8usize,
1448 concat!("Alignment of ", stringify!(msdfgen_Shape_Bounds))
1449 );
1450 assert_eq!(
1451 unsafe { ::std::ptr::addr_of!((*ptr).l) as usize - ptr as usize },
1452 0usize,
1453 concat!(
1454 "Offset of field: ",
1455 stringify!(msdfgen_Shape_Bounds),
1456 "::",
1457 stringify!(l)
1458 )
1459 );
1460 assert_eq!(
1461 unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize },
1462 8usize,
1463 concat!(
1464 "Offset of field: ",
1465 stringify!(msdfgen_Shape_Bounds),
1466 "::",
1467 stringify!(b)
1468 )
1469 );
1470 assert_eq!(
1471 unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize },
1472 16usize,
1473 concat!(
1474 "Offset of field: ",
1475 stringify!(msdfgen_Shape_Bounds),
1476 "::",
1477 stringify!(r)
1478 )
1479 );
1480 assert_eq!(
1481 unsafe { ::std::ptr::addr_of!((*ptr).t) as usize - ptr as usize },
1482 24usize,
1483 concat!(
1484 "Offset of field: ",
1485 stringify!(msdfgen_Shape_Bounds),
1486 "::",
1487 stringify!(t)
1488 )
1489 );
1490}
1491#[test]
1492fn bindgen_test_layout_msdfgen_Shape() {
1493 const UNINIT: ::std::mem::MaybeUninit<msdfgen_Shape> = ::std::mem::MaybeUninit::uninit();
1494 let ptr = UNINIT.as_ptr();
1495 assert_eq!(
1496 ::std::mem::size_of::<msdfgen_Shape>(),
1497 32usize,
1498 concat!("Size of: ", stringify!(msdfgen_Shape))
1499 );
1500 assert_eq!(
1501 ::std::mem::align_of::<msdfgen_Shape>(),
1502 8usize,
1503 concat!("Alignment of ", stringify!(msdfgen_Shape))
1504 );
1505 assert_eq!(
1506 unsafe { ::std::ptr::addr_of!((*ptr).contours) as usize - ptr as usize },
1507 0usize,
1508 concat!(
1509 "Offset of field: ",
1510 stringify!(msdfgen_Shape),
1511 "::",
1512 stringify!(contours)
1513 )
1514 );
1515 assert_eq!(
1516 unsafe { ::std::ptr::addr_of!((*ptr).inverseYAxis) as usize - ptr as usize },
1517 24usize,
1518 concat!(
1519 "Offset of field: ",
1520 stringify!(msdfgen_Shape),
1521 "::",
1522 stringify!(inverseYAxis)
1523 )
1524 );
1525}
1526extern "C" {
1527 #[doc = " Adds a contour."]
1528 #[link_name = "\u{1}_ZN7msdfgen5Shape10addContourERKNS_7ContourE"]
1529 pub fn msdfgen_Shape_addContour(this: *mut msdfgen_Shape, contour: *const msdfgen_Contour);
1530}
1531extern "C" {
1532 #[link_name = "\u{1}_ZN7msdfgen5Shape10addContourEONS_7ContourE"]
1533 pub fn msdfgen_Shape_addContour1(this: *mut msdfgen_Shape, contour: *mut msdfgen_Contour);
1534}
1535extern "C" {
1536 #[doc = " Adds a blank contour and returns its reference."]
1537 #[link_name = "\u{1}_ZN7msdfgen5Shape10addContourEv"]
1538 pub fn msdfgen_Shape_addContour2(this: *mut msdfgen_Shape) -> *mut msdfgen_Contour;
1539}
1540extern "C" {
1541 #[doc = " Normalizes the shape geometry for distance field generation."]
1542 #[link_name = "\u{1}_ZN7msdfgen5Shape9normalizeEv"]
1543 pub fn msdfgen_Shape_normalize(this: *mut msdfgen_Shape);
1544}
1545extern "C" {
1546 #[doc = " Performs basic checks to determine if the object represents a valid shape."]
1547 #[link_name = "\u{1}_ZNK7msdfgen5Shape8validateEv"]
1548 pub fn msdfgen_Shape_validate(this: *const msdfgen_Shape) -> bool;
1549}
1550extern "C" {
1551 #[doc = " Adjusts the bounding box to fit the shape."]
1552 #[link_name = "\u{1}_ZNK7msdfgen5Shape5boundERdS1_S1_S1_"]
1553 pub fn msdfgen_Shape_bound(
1554 this: *const msdfgen_Shape,
1555 l: *mut f64,
1556 b: *mut f64,
1557 r: *mut f64,
1558 t: *mut f64,
1559 );
1560}
1561extern "C" {
1562 #[doc = " Adjusts the bounding box to fit the shape border's mitered corners."]
1563 #[link_name = "\u{1}_ZNK7msdfgen5Shape11boundMitersERdS1_S1_S1_ddi"]
1564 pub fn msdfgen_Shape_boundMiters(
1565 this: *const msdfgen_Shape,
1566 l: *mut f64,
1567 b: *mut f64,
1568 r: *mut f64,
1569 t: *mut f64,
1570 border: f64,
1571 miterLimit: f64,
1572 polarity: ::std::os::raw::c_int,
1573 );
1574}
1575extern "C" {
1576 #[doc = " Computes the minimum bounding box that fits the shape, optionally with a (mitered) border."]
1577 #[link_name = "\u{1}_ZNK7msdfgen5Shape9getBoundsEddi"]
1578 pub fn msdfgen_Shape_getBounds(
1579 this: *const msdfgen_Shape,
1580 border: f64,
1581 miterLimit: f64,
1582 polarity: ::std::os::raw::c_int,
1583 ) -> msdfgen_Shape_Bounds;
1584}
1585extern "C" {
1586 #[doc = " Outputs the scanline that intersects the shape at y."]
1587 #[link_name = "\u{1}_ZNK7msdfgen5Shape8scanlineERNS_8ScanlineEd"]
1588 pub fn msdfgen_Shape_scanline(this: *const msdfgen_Shape, line: *mut msdfgen_Scanline, y: f64);
1589}
1590extern "C" {
1591 #[doc = " Returns the total number of edge segments"]
1592 #[link_name = "\u{1}_ZNK7msdfgen5Shape9edgeCountEv"]
1593 pub fn msdfgen_Shape_edgeCount(this: *const msdfgen_Shape) -> ::std::os::raw::c_int;
1594}
1595extern "C" {
1596 #[doc = " Assumes its contours are unoriented (even-odd fill rule). Attempts to orient them to conform to the non-zero winding rule."]
1597 #[link_name = "\u{1}_ZN7msdfgen5Shape14orientContoursEv"]
1598 pub fn msdfgen_Shape_orientContours(this: *mut msdfgen_Shape);
1599}
1600extern "C" {
1601 #[link_name = "\u{1}_ZN7msdfgen5ShapeC1Ev"]
1602 pub fn msdfgen_Shape_Shape(this: *mut msdfgen_Shape);
1603}
1604impl msdfgen_Shape {
1605 #[inline]
1606 pub unsafe fn addContour(&mut self, contour: *const msdfgen_Contour) {
1607 msdfgen_Shape_addContour(self, contour)
1608 }
1609 #[inline]
1610 pub unsafe fn addContour1(&mut self, contour: *mut msdfgen_Contour) {
1611 msdfgen_Shape_addContour1(self, contour)
1612 }
1613 #[inline]
1614 pub unsafe fn addContour2(&mut self) -> *mut msdfgen_Contour {
1615 msdfgen_Shape_addContour2(self)
1616 }
1617 #[inline]
1618 pub unsafe fn normalize(&mut self) {
1619 msdfgen_Shape_normalize(self)
1620 }
1621 #[inline]
1622 pub unsafe fn validate(&self) -> bool {
1623 msdfgen_Shape_validate(self)
1624 }
1625 #[inline]
1626 pub unsafe fn bound(&self, l: *mut f64, b: *mut f64, r: *mut f64, t: *mut f64) {
1627 msdfgen_Shape_bound(self, l, b, r, t)
1628 }
1629 #[inline]
1630 pub unsafe fn boundMiters(
1631 &self,
1632 l: *mut f64,
1633 b: *mut f64,
1634 r: *mut f64,
1635 t: *mut f64,
1636 border: f64,
1637 miterLimit: f64,
1638 polarity: ::std::os::raw::c_int,
1639 ) {
1640 msdfgen_Shape_boundMiters(self, l, b, r, t, border, miterLimit, polarity)
1641 }
1642 #[inline]
1643 pub unsafe fn getBounds(
1644 &self,
1645 border: f64,
1646 miterLimit: f64,
1647 polarity: ::std::os::raw::c_int,
1648 ) -> msdfgen_Shape_Bounds {
1649 msdfgen_Shape_getBounds(self, border, miterLimit, polarity)
1650 }
1651 #[inline]
1652 pub unsafe fn scanline(&self, line: *mut msdfgen_Scanline, y: f64) {
1653 msdfgen_Shape_scanline(self, line, y)
1654 }
1655 #[inline]
1656 pub unsafe fn edgeCount(&self) -> ::std::os::raw::c_int {
1657 msdfgen_Shape_edgeCount(self)
1658 }
1659 #[inline]
1660 pub unsafe fn orientContours(&mut self) {
1661 msdfgen_Shape_orientContours(self)
1662 }
1663 #[inline]
1664 pub unsafe fn new() -> Self {
1665 let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
1666 msdfgen_Shape_Shape(__bindgen_tmp.as_mut_ptr());
1667 __bindgen_tmp.assume_init()
1668 }
1669}
1670pub type msdfgen_byte = ::std::os::raw::c_uchar;
1671extern "C" {
1672 #[doc = " Assigns colors to edges of the shape in accordance to the multi-channel distance field technique.\n May split some edges if necessary.\n angleThreshold specifies the maximum angle (in radians) to be considered a corner, for example 3 (~172 degrees).\n Values below 1/2 PI will be treated as the external angle."]
1673 #[link_name = "\u{1}_ZN7msdfgen18edgeColoringSimpleERNS_5ShapeEdy"]
1674 pub fn msdfgen_edgeColoringSimple(
1675 shape: *mut msdfgen_Shape,
1676 angleThreshold: f64,
1677 seed: ::std::os::raw::c_ulonglong,
1678 );
1679}
1680extern "C" {
1681 #[doc = " The alternative \"ink trap\" coloring strategy is designed for better results with typefaces\n that use ink traps as a design feature. It guarantees that even if all edges that are shorter than\n both their neighboring edges are removed, the coloring remains consistent with the established rules."]
1682 #[link_name = "\u{1}_ZN7msdfgen19edgeColoringInkTrapERNS_5ShapeEdy"]
1683 pub fn msdfgen_edgeColoringInkTrap(
1684 shape: *mut msdfgen_Shape,
1685 angleThreshold: f64,
1686 seed: ::std::os::raw::c_ulonglong,
1687 );
1688}
1689extern "C" {
1690 #[doc = " The alternative coloring by distance tries to use different colors for edges that are close together.\n This should theoretically be the best strategy on average. However, since it needs to compute the distance\n between all pairs of edges, and perform a graph optimization task, it is much slower than the rest."]
1691 #[link_name = "\u{1}_ZN7msdfgen22edgeColoringByDistanceERNS_5ShapeEdy"]
1692 pub fn msdfgen_edgeColoringByDistance(
1693 shape: *mut msdfgen_Shape,
1694 angleThreshold: f64,
1695 seed: ::std::os::raw::c_ulonglong,
1696 );
1697}
1698#[doc = " The configuration of the MSDF error correction pass."]
1699#[repr(C)]
1700#[derive(Debug, Copy, Clone)]
1701pub struct msdfgen_ErrorCorrectionConfig {
1702 pub mode: msdfgen_ErrorCorrectionConfig_Mode,
1703 pub distanceCheckMode: msdfgen_ErrorCorrectionConfig_DistanceCheckMode,
1704 #[doc = " The minimum ratio between the actual and maximum expected distance delta to be considered an error."]
1705 pub minDeviationRatio: f64,
1706 #[doc = " The minimum ratio between the pre-correction distance error and the post-correction distance error. Has no effect for DO_NOT_CHECK_DISTANCE."]
1707 pub minImproveRatio: f64,
1708 #[doc = " An optional buffer to avoid dynamic allocation. Must have at least as many bytes as the MSDF has pixels."]
1709 pub buffer: *mut msdfgen_byte,
1710}
1711#[doc = " Skips error correction pass."]
1712pub const msdfgen_ErrorCorrectionConfig_Mode_DISABLED: msdfgen_ErrorCorrectionConfig_Mode = 0;
1713#[doc = " Corrects all discontinuities of the distance field regardless if edges are adversely affected."]
1714pub const msdfgen_ErrorCorrectionConfig_Mode_INDISCRIMINATE: msdfgen_ErrorCorrectionConfig_Mode = 1;
1715#[doc = " Corrects artifacts at edges and other discontinuous distances only if it does not affect edges or corners."]
1716pub const msdfgen_ErrorCorrectionConfig_Mode_EDGE_PRIORITY: msdfgen_ErrorCorrectionConfig_Mode = 2;
1717#[doc = " Only corrects artifacts at edges."]
1718pub const msdfgen_ErrorCorrectionConfig_Mode_EDGE_ONLY: msdfgen_ErrorCorrectionConfig_Mode = 3;
1719#[doc = " Mode of operation."]
1720pub type msdfgen_ErrorCorrectionConfig_Mode = ::std::os::raw::c_uint;
1721#[doc = " Never computes exact shape distance."]
1722pub const msdfgen_ErrorCorrectionConfig_DistanceCheckMode_DO_NOT_CHECK_DISTANCE:
1723 msdfgen_ErrorCorrectionConfig_DistanceCheckMode = 0;
1724#[doc = " Only computes exact shape distance at edges. Provides a good balance between speed and precision."]
1725pub const msdfgen_ErrorCorrectionConfig_DistanceCheckMode_CHECK_DISTANCE_AT_EDGE:
1726 msdfgen_ErrorCorrectionConfig_DistanceCheckMode = 1;
1727#[doc = " Computes and compares the exact shape distance for each suspected artifact."]
1728pub const msdfgen_ErrorCorrectionConfig_DistanceCheckMode_ALWAYS_CHECK_DISTANCE:
1729 msdfgen_ErrorCorrectionConfig_DistanceCheckMode = 2;
1730#[doc = " Configuration of whether to use an algorithm that computes the exact shape distance at the positions of suspected artifacts. This algorithm can be much slower."]
1731pub type msdfgen_ErrorCorrectionConfig_DistanceCheckMode = ::std::os::raw::c_uint;
1732extern "C" {
1733 #[doc = " The default value of minDeviationRatio."]
1734 #[link_name = "\u{1}_ZN7msdfgen21ErrorCorrectionConfig24defaultMinDeviationRatioE"]
1735 pub static msdfgen_ErrorCorrectionConfig_defaultMinDeviationRatio: f64;
1736}
1737extern "C" {
1738 #[doc = " The default value of minImproveRatio."]
1739 #[link_name = "\u{1}_ZN7msdfgen21ErrorCorrectionConfig22defaultMinImproveRatioE"]
1740 pub static msdfgen_ErrorCorrectionConfig_defaultMinImproveRatio: f64;
1741}
1742#[test]
1743fn bindgen_test_layout_msdfgen_ErrorCorrectionConfig() {
1744 const UNINIT: ::std::mem::MaybeUninit<msdfgen_ErrorCorrectionConfig> =
1745 ::std::mem::MaybeUninit::uninit();
1746 let ptr = UNINIT.as_ptr();
1747 assert_eq!(
1748 ::std::mem::size_of::<msdfgen_ErrorCorrectionConfig>(),
1749 32usize,
1750 concat!("Size of: ", stringify!(msdfgen_ErrorCorrectionConfig))
1751 );
1752 assert_eq!(
1753 ::std::mem::align_of::<msdfgen_ErrorCorrectionConfig>(),
1754 8usize,
1755 concat!("Alignment of ", stringify!(msdfgen_ErrorCorrectionConfig))
1756 );
1757 assert_eq!(
1758 unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize },
1759 0usize,
1760 concat!(
1761 "Offset of field: ",
1762 stringify!(msdfgen_ErrorCorrectionConfig),
1763 "::",
1764 stringify!(mode)
1765 )
1766 );
1767 assert_eq!(
1768 unsafe { ::std::ptr::addr_of!((*ptr).distanceCheckMode) as usize - ptr as usize },
1769 4usize,
1770 concat!(
1771 "Offset of field: ",
1772 stringify!(msdfgen_ErrorCorrectionConfig),
1773 "::",
1774 stringify!(distanceCheckMode)
1775 )
1776 );
1777 assert_eq!(
1778 unsafe { ::std::ptr::addr_of!((*ptr).minDeviationRatio) as usize - ptr as usize },
1779 8usize,
1780 concat!(
1781 "Offset of field: ",
1782 stringify!(msdfgen_ErrorCorrectionConfig),
1783 "::",
1784 stringify!(minDeviationRatio)
1785 )
1786 );
1787 assert_eq!(
1788 unsafe { ::std::ptr::addr_of!((*ptr).minImproveRatio) as usize - ptr as usize },
1789 16usize,
1790 concat!(
1791 "Offset of field: ",
1792 stringify!(msdfgen_ErrorCorrectionConfig),
1793 "::",
1794 stringify!(minImproveRatio)
1795 )
1796 );
1797 assert_eq!(
1798 unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
1799 24usize,
1800 concat!(
1801 "Offset of field: ",
1802 stringify!(msdfgen_ErrorCorrectionConfig),
1803 "::",
1804 stringify!(buffer)
1805 )
1806 );
1807}
1808#[doc = " The configuration of the distance field generator algorithm."]
1809#[repr(C)]
1810#[derive(Debug, Copy, Clone)]
1811pub struct msdfgen_GeneratorConfig {
1812 #[doc = " Specifies whether to use the version of the algorithm that supports overlapping contours with the same winding. May be set to false to improve performance when no such contours are present."]
1813 pub overlapSupport: bool,
1814}
1815#[test]
1816fn bindgen_test_layout_msdfgen_GeneratorConfig() {
1817 const UNINIT: ::std::mem::MaybeUninit<msdfgen_GeneratorConfig> =
1818 ::std::mem::MaybeUninit::uninit();
1819 let ptr = UNINIT.as_ptr();
1820 assert_eq!(
1821 ::std::mem::size_of::<msdfgen_GeneratorConfig>(),
1822 1usize,
1823 concat!("Size of: ", stringify!(msdfgen_GeneratorConfig))
1824 );
1825 assert_eq!(
1826 ::std::mem::align_of::<msdfgen_GeneratorConfig>(),
1827 1usize,
1828 concat!("Alignment of ", stringify!(msdfgen_GeneratorConfig))
1829 );
1830 assert_eq!(
1831 unsafe { ::std::ptr::addr_of!((*ptr).overlapSupport) as usize - ptr as usize },
1832 0usize,
1833 concat!(
1834 "Offset of field: ",
1835 stringify!(msdfgen_GeneratorConfig),
1836 "::",
1837 stringify!(overlapSupport)
1838 )
1839 );
1840}
1841#[doc = " The configuration of the multi-channel distance field generator algorithm."]
1842#[repr(C)]
1843#[derive(Debug, Copy, Clone)]
1844pub struct msdfgen_MSDFGeneratorConfig {
1845 pub _base: msdfgen_GeneratorConfig,
1846 #[doc = " Configuration of the error correction pass."]
1847 pub errorCorrection: msdfgen_ErrorCorrectionConfig,
1848}
1849#[test]
1850fn bindgen_test_layout_msdfgen_MSDFGeneratorConfig() {
1851 const UNINIT: ::std::mem::MaybeUninit<msdfgen_MSDFGeneratorConfig> =
1852 ::std::mem::MaybeUninit::uninit();
1853 let ptr = UNINIT.as_ptr();
1854 assert_eq!(
1855 ::std::mem::size_of::<msdfgen_MSDFGeneratorConfig>(),
1856 40usize,
1857 concat!("Size of: ", stringify!(msdfgen_MSDFGeneratorConfig))
1858 );
1859 assert_eq!(
1860 ::std::mem::align_of::<msdfgen_MSDFGeneratorConfig>(),
1861 8usize,
1862 concat!("Alignment of ", stringify!(msdfgen_MSDFGeneratorConfig))
1863 );
1864 assert_eq!(
1865 unsafe { ::std::ptr::addr_of!((*ptr).errorCorrection) as usize - ptr as usize },
1866 8usize,
1867 concat!(
1868 "Offset of field: ",
1869 stringify!(msdfgen_MSDFGeneratorConfig),
1870 "::",
1871 stringify!(errorCorrection)
1872 )
1873 );
1874}
1875extern "C" {
1876 #[doc = " Predicts potential artifacts caused by the interpolation of the MSDF and corrects them by converting nearby texels to single-channel."]
1877 #[link_name = "\u{1}_ZN7msdfgen19msdfErrorCorrectionERKNS_9BitmapRefIfLi3EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_19MSDFGeneratorConfigE"]
1878 pub fn msdfgen_msdfErrorCorrection(
1879 sdf: *const u8,
1880 shape: *const msdfgen_Shape,
1881 projection: *const msdfgen_Projection,
1882 range: f64,
1883 config: *const msdfgen_MSDFGeneratorConfig,
1884 );
1885}
1886extern "C" {
1887 #[link_name = "\u{1}_ZN7msdfgen19msdfErrorCorrectionERKNS_9BitmapRefIfLi4EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_19MSDFGeneratorConfigE"]
1888 pub fn msdfgen_msdfErrorCorrection1(
1889 sdf: *const u8,
1890 shape: *const msdfgen_Shape,
1891 projection: *const msdfgen_Projection,
1892 range: f64,
1893 config: *const msdfgen_MSDFGeneratorConfig,
1894 );
1895}
1896extern "C" {
1897 #[doc = " Applies the simplified error correction to all discontiunous distances (INDISCRIMINATE mode). Does not need shape or translation."]
1898 #[link_name = "\u{1}_ZN7msdfgen31msdfFastDistanceErrorCorrectionERKNS_9BitmapRefIfLi3EEERKNS_10ProjectionEdd"]
1899 pub fn msdfgen_msdfFastDistanceErrorCorrection(
1900 sdf: *const u8,
1901 projection: *const msdfgen_Projection,
1902 range: f64,
1903 minDeviationRatio: f64,
1904 );
1905}
1906extern "C" {
1907 #[link_name = "\u{1}_ZN7msdfgen31msdfFastDistanceErrorCorrectionERKNS_9BitmapRefIfLi4EEERKNS_10ProjectionEdd"]
1908 pub fn msdfgen_msdfFastDistanceErrorCorrection1(
1909 sdf: *const u8,
1910 projection: *const msdfgen_Projection,
1911 range: f64,
1912 minDeviationRatio: f64,
1913 );
1914}
1915extern "C" {
1916 #[doc = " Applies the simplified error correction to edges only (EDGE_ONLY mode). Does not need shape or translation."]
1917 #[link_name = "\u{1}_ZN7msdfgen27msdfFastEdgeErrorCorrectionERKNS_9BitmapRefIfLi3EEERKNS_10ProjectionEdd"]
1918 pub fn msdfgen_msdfFastEdgeErrorCorrection(
1919 sdf: *const u8,
1920 projection: *const msdfgen_Projection,
1921 range: f64,
1922 minDeviationRatio: f64,
1923 );
1924}
1925extern "C" {
1926 #[link_name = "\u{1}_ZN7msdfgen27msdfFastEdgeErrorCorrectionERKNS_9BitmapRefIfLi4EEERKNS_10ProjectionEdd"]
1927 pub fn msdfgen_msdfFastEdgeErrorCorrection1(
1928 sdf: *const u8,
1929 projection: *const msdfgen_Projection,
1930 range: f64,
1931 minDeviationRatio: f64,
1932 );
1933}
1934extern "C" {
1935 #[doc = " The original version of the error correction algorithm."]
1936 #[link_name = "\u{1}_ZN7msdfgen26msdfErrorCorrection_legacyERKNS_9BitmapRefIfLi3EEERKNS_7Vector2E"]
1937 pub fn msdfgen_msdfErrorCorrection_legacy(output: *const u8, threshold: *const msdfgen_Vector2);
1938}
1939extern "C" {
1940 #[link_name = "\u{1}_ZN7msdfgen26msdfErrorCorrection_legacyERKNS_9BitmapRefIfLi4EEERKNS_7Vector2E"]
1941 pub fn msdfgen_msdfErrorCorrection_legacy1(
1942 output: *const u8,
1943 threshold: *const msdfgen_Vector2,
1944 );
1945}
1946extern "C" {
1947 #[doc = " Reconstructs the shape's appearance into output from the distance field sdf."]
1948 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi1EEERKNS_14BitmapConstRefIfLi1EEEdf"]
1949 pub fn msdfgen_renderSDF(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1950}
1951extern "C" {
1952 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi3EEERKNS_14BitmapConstRefIfLi1EEEdf"]
1953 pub fn msdfgen_renderSDF1(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1954}
1955extern "C" {
1956 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi1EEERKNS_14BitmapConstRefIfLi3EEEdf"]
1957 pub fn msdfgen_renderSDF2(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1958}
1959extern "C" {
1960 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi3EEERKNS_14BitmapConstRefIfLi3EEEdf"]
1961 pub fn msdfgen_renderSDF3(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1962}
1963extern "C" {
1964 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi1EEERKNS_14BitmapConstRefIfLi4EEEdf"]
1965 pub fn msdfgen_renderSDF4(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1966}
1967extern "C" {
1968 #[link_name = "\u{1}_ZN7msdfgen9renderSDFERKNS_9BitmapRefIfLi4EEERKNS_14BitmapConstRefIfLi4EEEdf"]
1969 pub fn msdfgen_renderSDF5(output: *const u8, sdf: *const u8, pxRange: f64, midValue: f32);
1970}
1971extern "C" {
1972 #[doc = " Snaps the values of the floating-point bitmaps into one of the 256 values representable in a standard 8-bit bitmap."]
1973 #[link_name = "\u{1}_ZN7msdfgen12simulate8bitERKNS_9BitmapRefIfLi1EEE"]
1974 pub fn msdfgen_simulate8bit(bitmap: *const u8);
1975}
1976extern "C" {
1977 #[link_name = "\u{1}_ZN7msdfgen12simulate8bitERKNS_9BitmapRefIfLi3EEE"]
1978 pub fn msdfgen_simulate8bit1(bitmap: *const u8);
1979}
1980extern "C" {
1981 #[link_name = "\u{1}_ZN7msdfgen12simulate8bitERKNS_9BitmapRefIfLi4EEE"]
1982 pub fn msdfgen_simulate8bit2(bitmap: *const u8);
1983}
1984extern "C" {
1985 #[doc = " Rasterizes the shape into a monochrome bitmap."]
1986 #[link_name = "\u{1}_ZN7msdfgen9rasterizeERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_10ProjectionENS_8FillRuleE"]
1987 pub fn msdfgen_rasterize(
1988 output: *const u8,
1989 shape: *const msdfgen_Shape,
1990 projection: *const msdfgen_Projection,
1991 fillRule: msdfgen_FillRule,
1992 );
1993}
1994extern "C" {
1995 #[doc = " Fixes the sign of the input signed distance field, so that it matches the shape's rasterized fill."]
1996 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_10ProjectionENS_8FillRuleE"]
1997 pub fn msdfgen_distanceSignCorrection(
1998 sdf: *const u8,
1999 shape: *const msdfgen_Shape,
2000 projection: *const msdfgen_Projection,
2001 fillRule: msdfgen_FillRule,
2002 );
2003}
2004extern "C" {
2005 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi3EEERKNS_5ShapeERKNS_10ProjectionENS_8FillRuleE"]
2006 pub fn msdfgen_distanceSignCorrection1(
2007 sdf: *const u8,
2008 shape: *const msdfgen_Shape,
2009 projection: *const msdfgen_Projection,
2010 fillRule: msdfgen_FillRule,
2011 );
2012}
2013extern "C" {
2014 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi4EEERKNS_5ShapeERKNS_10ProjectionENS_8FillRuleE"]
2015 pub fn msdfgen_distanceSignCorrection2(
2016 sdf: *const u8,
2017 shape: *const msdfgen_Shape,
2018 projection: *const msdfgen_Projection,
2019 fillRule: msdfgen_FillRule,
2020 );
2021}
2022extern "C" {
2023 #[link_name = "\u{1}_ZN7msdfgen9rasterizeERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_7Vector2ES9_NS_8FillRuleE"]
2024 pub fn msdfgen_rasterize1(
2025 output: *const u8,
2026 shape: *const msdfgen_Shape,
2027 scale: *const msdfgen_Vector2,
2028 translate: *const msdfgen_Vector2,
2029 fillRule: msdfgen_FillRule,
2030 );
2031}
2032extern "C" {
2033 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_7Vector2ES9_NS_8FillRuleE"]
2034 pub fn msdfgen_distanceSignCorrection3(
2035 sdf: *const u8,
2036 shape: *const msdfgen_Shape,
2037 scale: *const msdfgen_Vector2,
2038 translate: *const msdfgen_Vector2,
2039 fillRule: msdfgen_FillRule,
2040 );
2041}
2042extern "C" {
2043 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi3EEERKNS_5ShapeERKNS_7Vector2ES9_NS_8FillRuleE"]
2044 pub fn msdfgen_distanceSignCorrection4(
2045 sdf: *const u8,
2046 shape: *const msdfgen_Shape,
2047 scale: *const msdfgen_Vector2,
2048 translate: *const msdfgen_Vector2,
2049 fillRule: msdfgen_FillRule,
2050 );
2051}
2052extern "C" {
2053 #[link_name = "\u{1}_ZN7msdfgen22distanceSignCorrectionERKNS_9BitmapRefIfLi4EEERKNS_5ShapeERKNS_7Vector2ES9_NS_8FillRuleE"]
2054 pub fn msdfgen_distanceSignCorrection5(
2055 sdf: *const u8,
2056 shape: *const msdfgen_Shape,
2057 scale: *const msdfgen_Vector2,
2058 translate: *const msdfgen_Vector2,
2059 fillRule: msdfgen_FillRule,
2060 );
2061}
2062extern "C" {
2063 #[doc = " Analytically constructs a scanline at y evaluating fill by linear interpolation of the SDF."]
2064 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi1EEERKNS_10ProjectionEdb"]
2065 pub fn msdfgen_scanlineSDF(
2066 line: *mut msdfgen_Scanline,
2067 sdf: *const u8,
2068 projection: *const msdfgen_Projection,
2069 y: f64,
2070 inverseYAxis: bool,
2071 );
2072}
2073extern "C" {
2074 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi3EEERKNS_10ProjectionEdb"]
2075 pub fn msdfgen_scanlineSDF1(
2076 line: *mut msdfgen_Scanline,
2077 sdf: *const u8,
2078 projection: *const msdfgen_Projection,
2079 y: f64,
2080 inverseYAxis: bool,
2081 );
2082}
2083extern "C" {
2084 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi4EEERKNS_10ProjectionEdb"]
2085 pub fn msdfgen_scanlineSDF2(
2086 line: *mut msdfgen_Scanline,
2087 sdf: *const u8,
2088 projection: *const msdfgen_Projection,
2089 y: f64,
2090 inverseYAxis: bool,
2091 );
2092}
2093extern "C" {
2094 #[doc = " Estimates the portion of the area that will be filled incorrectly when rendering using the SDF."]
2095 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi1EEERKNS_5ShapeERKNS_10ProjectionEiNS_8FillRuleE"]
2096 pub fn msdfgen_estimateSDFError(
2097 sdf: *const u8,
2098 shape: *const msdfgen_Shape,
2099 projection: *const msdfgen_Projection,
2100 scanlinesPerRow: ::std::os::raw::c_int,
2101 fillRule: msdfgen_FillRule,
2102 ) -> f64;
2103}
2104extern "C" {
2105 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi3EEERKNS_5ShapeERKNS_10ProjectionEiNS_8FillRuleE"]
2106 pub fn msdfgen_estimateSDFError1(
2107 sdf: *const u8,
2108 shape: *const msdfgen_Shape,
2109 projection: *const msdfgen_Projection,
2110 scanlinesPerRow: ::std::os::raw::c_int,
2111 fillRule: msdfgen_FillRule,
2112 ) -> f64;
2113}
2114extern "C" {
2115 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi4EEERKNS_5ShapeERKNS_10ProjectionEiNS_8FillRuleE"]
2116 pub fn msdfgen_estimateSDFError2(
2117 sdf: *const u8,
2118 shape: *const msdfgen_Shape,
2119 projection: *const msdfgen_Projection,
2120 scanlinesPerRow: ::std::os::raw::c_int,
2121 fillRule: msdfgen_FillRule,
2122 ) -> f64;
2123}
2124extern "C" {
2125 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi1EEERKNS_7Vector2ES8_bd"]
2126 pub fn msdfgen_scanlineSDF3(
2127 line: *mut msdfgen_Scanline,
2128 sdf: *const u8,
2129 scale: *const msdfgen_Vector2,
2130 translate: *const msdfgen_Vector2,
2131 inverseYAxis: bool,
2132 y: f64,
2133 );
2134}
2135extern "C" {
2136 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi3EEERKNS_7Vector2ES8_bd"]
2137 pub fn msdfgen_scanlineSDF4(
2138 line: *mut msdfgen_Scanline,
2139 sdf: *const u8,
2140 scale: *const msdfgen_Vector2,
2141 translate: *const msdfgen_Vector2,
2142 inverseYAxis: bool,
2143 y: f64,
2144 );
2145}
2146extern "C" {
2147 #[link_name = "\u{1}_ZN7msdfgen11scanlineSDFERNS_8ScanlineERKNS_14BitmapConstRefIfLi4EEERKNS_7Vector2ES8_bd"]
2148 pub fn msdfgen_scanlineSDF5(
2149 line: *mut msdfgen_Scanline,
2150 sdf: *const u8,
2151 scale: *const msdfgen_Vector2,
2152 translate: *const msdfgen_Vector2,
2153 inverseYAxis: bool,
2154 y: f64,
2155 );
2156}
2157extern "C" {
2158 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi1EEERKNS_5ShapeERKNS_7Vector2ES9_iNS_8FillRuleE"]
2159 pub fn msdfgen_estimateSDFError3(
2160 sdf: *const u8,
2161 shape: *const msdfgen_Shape,
2162 scale: *const msdfgen_Vector2,
2163 translate: *const msdfgen_Vector2,
2164 scanlinesPerRow: ::std::os::raw::c_int,
2165 fillRule: msdfgen_FillRule,
2166 ) -> f64;
2167}
2168extern "C" {
2169 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi3EEERKNS_5ShapeERKNS_7Vector2ES9_iNS_8FillRuleE"]
2170 pub fn msdfgen_estimateSDFError4(
2171 sdf: *const u8,
2172 shape: *const msdfgen_Shape,
2173 scale: *const msdfgen_Vector2,
2174 translate: *const msdfgen_Vector2,
2175 scanlinesPerRow: ::std::os::raw::c_int,
2176 fillRule: msdfgen_FillRule,
2177 ) -> f64;
2178}
2179extern "C" {
2180 #[link_name = "\u{1}_ZN7msdfgen16estimateSDFErrorERKNS_14BitmapConstRefIfLi4EEERKNS_5ShapeERKNS_7Vector2ES9_iNS_8FillRuleE"]
2181 pub fn msdfgen_estimateSDFError5(
2182 sdf: *const u8,
2183 shape: *const msdfgen_Shape,
2184 scale: *const msdfgen_Vector2,
2185 translate: *const msdfgen_Vector2,
2186 scanlinesPerRow: ::std::os::raw::c_int,
2187 fillRule: msdfgen_FillRule,
2188 ) -> f64;
2189}
2190extern "C" {
2191 #[doc = " Saves the bitmap as a BMP file."]
2192 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIhLi1EEEPKc"]
2193 pub fn msdfgen_saveBmp(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2194}
2195extern "C" {
2196 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIhLi3EEEPKc"]
2197 pub fn msdfgen_saveBmp1(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2198}
2199extern "C" {
2200 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIhLi4EEEPKc"]
2201 pub fn msdfgen_saveBmp2(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2202}
2203extern "C" {
2204 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIfLi1EEEPKc"]
2205 pub fn msdfgen_saveBmp3(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2206}
2207extern "C" {
2208 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIfLi3EEEPKc"]
2209 pub fn msdfgen_saveBmp4(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2210}
2211extern "C" {
2212 #[link_name = "\u{1}_ZN7msdfgen7saveBmpERKNS_14BitmapConstRefIfLi4EEEPKc"]
2213 pub fn msdfgen_saveBmp5(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2214}
2215extern "C" {
2216 #[doc = " Saves the bitmap as an uncompressed floating-point TIFF file."]
2217 #[link_name = "\u{1}_ZN7msdfgen8saveTiffERKNS_14BitmapConstRefIfLi1EEEPKc"]
2218 pub fn msdfgen_saveTiff(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2219}
2220extern "C" {
2221 #[link_name = "\u{1}_ZN7msdfgen8saveTiffERKNS_14BitmapConstRefIfLi3EEEPKc"]
2222 pub fn msdfgen_saveTiff1(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2223}
2224extern "C" {
2225 #[link_name = "\u{1}_ZN7msdfgen8saveTiffERKNS_14BitmapConstRefIfLi4EEEPKc"]
2226 pub fn msdfgen_saveTiff2(bitmap: *const u8, filename: *const ::std::os::raw::c_char) -> bool;
2227}
2228extern "C" {
2229 #[doc = " Generates a conventional single-channel signed distance field."]
2230 #[link_name = "\u{1}_ZN7msdfgen11generateSDFERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_15GeneratorConfigE"]
2231 pub fn msdfgen_generateSDF(
2232 output: *const u8,
2233 shape: *const msdfgen_Shape,
2234 projection: *const msdfgen_Projection,
2235 range: f64,
2236 config: *const msdfgen_GeneratorConfig,
2237 );
2238}
2239extern "C" {
2240 #[doc = " Generates a single-channel signed pseudo-distance field."]
2241 #[link_name = "\u{1}_ZN7msdfgen17generatePseudoSDFERKNS_9BitmapRefIfLi1EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_15GeneratorConfigE"]
2242 pub fn msdfgen_generatePseudoSDF(
2243 output: *const u8,
2244 shape: *const msdfgen_Shape,
2245 projection: *const msdfgen_Projection,
2246 range: f64,
2247 config: *const msdfgen_GeneratorConfig,
2248 );
2249}
2250extern "C" {
2251 #[doc = " Generates a multi-channel signed distance field. Edge colors must be assigned first! (See edgeColoringSimple)"]
2252 #[link_name = "\u{1}_ZN7msdfgen12generateMSDFERKNS_9BitmapRefIfLi3EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_19MSDFGeneratorConfigE"]
2253 pub fn msdfgen_generateMSDF(
2254 output: *const u8,
2255 shape: *const msdfgen_Shape,
2256 projection: *const msdfgen_Projection,
2257 range: f64,
2258 config: *const msdfgen_MSDFGeneratorConfig,
2259 );
2260}
2261extern "C" {
2262 #[doc = " Generates a multi-channel signed distance field with true distance in the alpha channel. Edge colors must be assigned first."]
2263 #[link_name = "\u{1}_ZN7msdfgen13generateMTSDFERKNS_9BitmapRefIfLi4EEERKNS_5ShapeERKNS_10ProjectionEdRKNS_19MSDFGeneratorConfigE"]
2264 pub fn msdfgen_generateMTSDF(
2265 output: *const u8,
2266 shape: *const msdfgen_Shape,
2267 projection: *const msdfgen_Projection,
2268 range: f64,
2269 config: *const msdfgen_MSDFGeneratorConfig,
2270 );
2271}
2272extern "C" {
2273 #[link_name = "\u{1}_ZN7msdfgen11generateSDFERKNS_9BitmapRefIfLi1EEERKNS_5ShapeEdRKNS_7Vector2ES9_b"]
2274 pub fn msdfgen_generateSDF1(
2275 output: *const u8,
2276 shape: *const msdfgen_Shape,
2277 range: f64,
2278 scale: *const msdfgen_Vector2,
2279 translate: *const msdfgen_Vector2,
2280 overlapSupport: bool,
2281 );
2282}
2283extern "C" {
2284 #[link_name = "\u{1}_ZN7msdfgen17generatePseudoSDFERKNS_9BitmapRefIfLi1EEERKNS_5ShapeEdRKNS_7Vector2ES9_b"]
2285 pub fn msdfgen_generatePseudoSDF1(
2286 output: *const u8,
2287 shape: *const msdfgen_Shape,
2288 range: f64,
2289 scale: *const msdfgen_Vector2,
2290 translate: *const msdfgen_Vector2,
2291 overlapSupport: bool,
2292 );
2293}
2294extern "C" {
2295 #[link_name = "\u{1}_ZN7msdfgen12generateMSDFERKNS_9BitmapRefIfLi3EEERKNS_5ShapeEdRKNS_7Vector2ES9_RKNS_21ErrorCorrectionConfigEb"]
2296 pub fn msdfgen_generateMSDF1(
2297 output: *const u8,
2298 shape: *const msdfgen_Shape,
2299 range: f64,
2300 scale: *const msdfgen_Vector2,
2301 translate: *const msdfgen_Vector2,
2302 errorCorrectionConfig: *const msdfgen_ErrorCorrectionConfig,
2303 overlapSupport: bool,
2304 );
2305}
2306extern "C" {
2307 #[link_name = "\u{1}_ZN7msdfgen13generateMTSDFERKNS_9BitmapRefIfLi4EEERKNS_5ShapeEdRKNS_7Vector2ES9_RKNS_21ErrorCorrectionConfigEb"]
2308 pub fn msdfgen_generateMTSDF1(
2309 output: *const u8,
2310 shape: *const msdfgen_Shape,
2311 range: f64,
2312 scale: *const msdfgen_Vector2,
2313 translate: *const msdfgen_Vector2,
2314 errorCorrectionConfig: *const msdfgen_ErrorCorrectionConfig,
2315 overlapSupport: bool,
2316 );
2317}
2318extern "C" {
2319 #[link_name = "\u{1}_ZN7msdfgen18generateSDF_legacyERKNS_9BitmapRefIfLi1EEERKNS_5ShapeEdRKNS_7Vector2ES9_"]
2320 pub fn msdfgen_generateSDF_legacy(
2321 output: *const u8,
2322 shape: *const msdfgen_Shape,
2323 range: f64,
2324 scale: *const msdfgen_Vector2,
2325 translate: *const msdfgen_Vector2,
2326 );
2327}
2328extern "C" {
2329 #[link_name = "\u{1}_ZN7msdfgen24generatePseudoSDF_legacyERKNS_9BitmapRefIfLi1EEERKNS_5ShapeEdRKNS_7Vector2ES9_"]
2330 pub fn msdfgen_generatePseudoSDF_legacy(
2331 output: *const u8,
2332 shape: *const msdfgen_Shape,
2333 range: f64,
2334 scale: *const msdfgen_Vector2,
2335 translate: *const msdfgen_Vector2,
2336 );
2337}
2338extern "C" {
2339 #[link_name = "\u{1}_ZN7msdfgen19generateMSDF_legacyERKNS_9BitmapRefIfLi3EEERKNS_5ShapeEdRKNS_7Vector2ES9_NS_21ErrorCorrectionConfigE"]
2340 pub fn msdfgen_generateMSDF_legacy(
2341 output: *const u8,
2342 shape: *const msdfgen_Shape,
2343 range: f64,
2344 scale: *const msdfgen_Vector2,
2345 translate: *const msdfgen_Vector2,
2346 errorCorrectionConfig: msdfgen_ErrorCorrectionConfig,
2347 );
2348}
2349extern "C" {
2350 #[link_name = "\u{1}_ZN7msdfgen20generateMTSDF_legacyERKNS_9BitmapRefIfLi4EEERKNS_5ShapeEdRKNS_7Vector2ES9_NS_21ErrorCorrectionConfigE"]
2351 pub fn msdfgen_generateMTSDF_legacy(
2352 output: *const u8,
2353 shape: *const msdfgen_Shape,
2354 range: f64,
2355 scale: *const msdfgen_Vector2,
2356 translate: *const msdfgen_Vector2,
2357 errorCorrectionConfig: msdfgen_ErrorCorrectionConfig,
2358 );
2359}
2360extern "C" {
2361 #[link_name = "\u{1}_ZN7msdfgen19Contour_constructorEv"]
2362 pub fn msdfgen_Contour_constructor() -> msdfgen_Contour;
2363}
2364extern "C" {
2365 #[link_name = "\u{1}_ZN7msdfgen18Contour_destructorERNS_7ContourE"]
2366 pub fn msdfgen_Contour_destructor(self_: *mut msdfgen_Contour);
2367}
2368extern "C" {
2369 #[link_name = "\u{1}_ZN7msdfgen16Shape_destructorERNS_5ShapeE"]
2370 pub fn msdfgen_Shape_destructor(self_: *mut msdfgen_Shape);
2371}
2372extern "C" {
2373 #[link_name = "\u{1}_ZN7msdfgen19Scanline_destructorERNS_8ScanlineE"]
2374 pub fn msdfgen_Scanline_destructor(self_: *mut msdfgen_Scanline);
2375}
2376extern "C" {
2377 #[link_name = "\u{1}_ZN7msdfgen21EdgeHolder_setSegmentERNS_10EdgeHolderERKNS_11EdgeSegmentE"]
2378 pub fn msdfgen_EdgeHolder_setSegment(
2379 self_: *mut msdfgen_EdgeHolder,
2380 segment: *const msdfgen_EdgeSegment,
2381 );
2382}
2383pub const msdfgen_SegmentKind_LINEAR: msdfgen_SegmentKind = 0;
2384pub const msdfgen_SegmentKind_QUADRATIC: msdfgen_SegmentKind = 1;
2385pub const msdfgen_SegmentKind_CUBIC: msdfgen_SegmentKind = 2;
2386pub type msdfgen_SegmentKind = ::std::os::raw::c_uint;
2387extern "C" {
2388 #[link_name = "\u{1}_ZN7msdfgen19EdgeSegment_getKindERKNS_11EdgeSegmentE"]
2389 pub fn msdfgen_EdgeSegment_getKind(self_: *const msdfgen_EdgeSegment) -> msdfgen_SegmentKind;
2390}