1#[repr(C)]
4#[derive(Debug, Copy, Clone)]
5pub struct ClipperClipper64 {
6 _unused: [u8; 0],
7}
8#[repr(C)]
9#[derive(Debug, Copy, Clone)]
10pub struct ClipperClipperD {
11 _unused: [u8; 0],
12}
13#[repr(C)]
14#[derive(Debug, Copy, Clone)]
15pub struct ClipperClipperOffset {
16 _unused: [u8; 0],
17}
18#[repr(C)]
19#[derive(Debug, Copy, Clone)]
20pub struct ClipperPath64 {
21 _unused: [u8; 0],
22}
23#[repr(C)]
24#[derive(Debug, Copy, Clone)]
25pub struct ClipperPathD {
26 _unused: [u8; 0],
27}
28#[repr(C)]
29#[derive(Debug, Copy, Clone)]
30pub struct ClipperPaths64 {
31 _unused: [u8; 0],
32}
33#[repr(C)]
34#[derive(Debug, Copy, Clone)]
35pub struct ClipperPathsD {
36 _unused: [u8; 0],
37}
38#[repr(C)]
39#[derive(Debug, Copy, Clone)]
40pub struct ClipperPolyTree64 {
41 _unused: [u8; 0],
42}
43#[repr(C)]
44#[derive(Debug, Copy, Clone)]
45pub struct ClipperPolyTreeD {
46 _unused: [u8; 0],
47}
48#[doc = " Coordinate pair in floating-point (f64) space. The clipping engine\n itself runs on integers; ClipperClipperD multiplies each component\n by its scale factor (s = 128 at the default precision = 2) and\n rounds to ClipperPoint64 before feeding the engine, so |x × s| and\n |y × s| must fit ClipperPoint64's range. Outputs are divided back\n and quantised to the scaling grid."]
49#[repr(C)]
50#[derive(Debug, Default, Copy, Clone, PartialEq)]
51pub struct ClipperPointD {
52 pub x: f64,
53 pub y: f64,
54}
55#[allow(clippy::unnecessary_operation, clippy::identity_op)]
56const _: () = {
57 ["Size of ClipperPointD"][::std::mem::size_of::<ClipperPointD>() - 16usize];
58 ["Alignment of ClipperPointD"][::std::mem::align_of::<ClipperPointD>() - 8usize];
59 ["Offset of field: ClipperPointD::x"][::std::mem::offset_of!(ClipperPointD, x) - 0usize];
60 ["Offset of field: ClipperPointD::y"][::std::mem::offset_of!(ClipperPointD, y) - 8usize];
61};
62#[doc = " Coordinate pair in the engine's native integer (i64) space. Each\n component must satisfy |c| ≤ INT64_MAX/4 (~2.3 × 10¹⁸); values\n outside this range produce a range error during a clipping\n operation."]
63#[repr(C)]
64#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
65#[cfg_attr(
66 feature = "serde",
67 derive(serde::Serialize, serde::Deserialize)
68)]
69pub struct ClipperPoint64 {
70 pub x: i64,
71 pub y: i64,
72}
73#[allow(clippy::unnecessary_operation, clippy::identity_op)]
74const _: () = {
75 ["Size of ClipperPoint64"][::std::mem::size_of::<ClipperPoint64>() - 16usize];
76 ["Alignment of ClipperPoint64"][::std::mem::align_of::<ClipperPoint64>() - 8usize];
77 ["Offset of field: ClipperPoint64::x"][::std::mem::offset_of!(ClipperPoint64, x) - 0usize];
78 ["Offset of field: ClipperPoint64::y"][::std::mem::offset_of!(ClipperPoint64, y) - 8usize];
79};
80pub const ClipperFillRule_EVEN_ODD: ClipperFillRule = 0;
81pub const ClipperFillRule_NON_ZERO: ClipperFillRule = 1;
82pub const ClipperFillRule_POSITIVE: ClipperFillRule = 2;
83pub const ClipperFillRule_NEGATIVE: ClipperFillRule = 3;
84#[doc = " Determines which subregions are 'inside' when paths self-intersect\n or overlap. EVEN_ODD toggles inside/outside on every edge crossing.\n NON_ZERO uses the winding-number sign — the conventional rule for\n polygons-with-holes data where holes wind opposite to their outer\n contour. POSITIVE and NEGATIVE only count windings of the matching\n sign, useful when direction has been baked into the input."]
85pub type ClipperFillRule = ::std::os::raw::c_uint;
86pub const ClipperClipType_NONE: ClipperClipType = 0;
87pub const ClipperClipType_INTERSECTION: ClipperClipType = 1;
88pub const ClipperClipType_UNION: ClipperClipType = 2;
89pub const ClipperClipType_DIFFERENCE: ClipperClipType = 3;
90pub const ClipperClipType_XOR: ClipperClipType = 4;
91#[doc = " Boolean operation kind. NONE is the sentinel default for an\n unconfigured engine — passing it to clipper_*_execute is undefined.\n Use INTERSECTION / UNION / DIFFERENCE / XOR for the standard four\n set operations."]
92pub type ClipperClipType = ::std::os::raw::c_uint;
93pub const ClipperPathType_SUBJECT: ClipperPathType = 0;
94pub const ClipperPathType_CLIP: ClipperPathType = 1;
95#[doc = " Subject paths are the input geometry being clipped. Clip paths are\n the mask. The clipping engine combines the two sets according to\n the chosen ClipperClipType and ClipperFillRule."]
96pub type ClipperPathType = ::std::os::raw::c_uint;
97pub const ClipperJoinType_SQUARE_JOIN: ClipperJoinType = 0;
98pub const ClipperJoinType_BEVEL_JOIN: ClipperJoinType = 1;
99pub const ClipperJoinType_ROUND_JOIN: ClipperJoinType = 2;
100pub const ClipperJoinType_MITER_JOIN: ClipperJoinType = 3;
101#[doc = " Corner-handling style for ClipperOffset; same shapes as SVG and\n Cairo stroke joins. SQUARE squares off perpendicular to the\n corner. BEVEL flattens the corner with a straight cut. ROUND\n replaces it with a circular arc. MITER extends the offset edges\n to their intersection, clipped at the configured miter limit."]
102pub type ClipperJoinType = ::std::os::raw::c_uint;
103pub const ClipperEndType_POLYGON_END: ClipperEndType = 0;
104pub const ClipperEndType_JOINED_END: ClipperEndType = 1;
105pub const ClipperEndType_BUTT_END: ClipperEndType = 2;
106pub const ClipperEndType_SQUARE_END: ClipperEndType = 3;
107pub const ClipperEndType_ROUND_END: ClipperEndType = 4;
108#[doc = " Open-path endpoint handling for ClipperOffset. POLYGON_END is the\n closed-polygon case — no endpoints to inflate. The other variants\n decide how the start and end of a polyline are extended (listed in\n enum order): JOINED keeps polylines connected to neighbouring\n segments, BUTT keeps the line flat at the original endpoint,\n SQUARE extends one delta past it, ROUND adds a half-circle cap."]
109pub type ClipperEndType = ::std::os::raw::c_uint;
110pub const ClipperPointInPolygonResult_IS_ON: ClipperPointInPolygonResult = 0;
111pub const ClipperPointInPolygonResult_IS_INSIDE: ClipperPointInPolygonResult = 1;
112pub const ClipperPointInPolygonResult_IS_OUTSIDE: ClipperPointInPolygonResult = 2;
113pub type ClipperPointInPolygonResult = ::std::os::raw::c_uint;
114unsafe extern "C" {
115 #[doc = " Path Offsetting"]
116 pub fn clipper_paths64_inflate(
117 mem: *mut ::std::os::raw::c_void,
118 paths: *mut ClipperPaths64,
119 delta: f64,
120 jt: ClipperJoinType,
121 et: ClipperEndType,
122 miter_limit: f64,
123 ) -> *mut ClipperPaths64;
124}
125unsafe extern "C" {
126 pub fn clipper_pathsd_inflate(
127 mem: *mut ::std::os::raw::c_void,
128 paths: *mut ClipperPathsD,
129 delta: f64,
130 jt: ClipperJoinType,
131 et: ClipperEndType,
132 miter_limit: f64,
133 precision: ::std::os::raw::c_int,
134 ) -> *mut ClipperPathsD;
135}
136unsafe extern "C" {
137 #[doc = " Path Constructors"]
138 pub fn clipper_path64(mem: *mut ::std::os::raw::c_void) -> *mut ClipperPath64;
139}
140unsafe extern "C" {
141 pub fn clipper_pathd(mem: *mut ::std::os::raw::c_void) -> *mut ClipperPathD;
142}
143unsafe extern "C" {
144 pub fn clipper_path64_of_points(
145 mem: *mut ::std::os::raw::c_void,
146 pts: *mut ClipperPoint64,
147 len_pts: usize,
148 ) -> *mut ClipperPath64;
149}
150unsafe extern "C" {
151 pub fn clipper_pathd_of_points(
152 mem: *mut ::std::os::raw::c_void,
153 pts: *mut ClipperPointD,
154 len_pts: usize,
155 ) -> *mut ClipperPathD;
156}
157unsafe extern "C" {
158 pub fn clipper_path64_add_point(path: *mut ClipperPath64, pt: ClipperPoint64);
159}
160unsafe extern "C" {
161 pub fn clipper_pathd_add_point(path: *mut ClipperPathD, pt: ClipperPointD);
162}
163unsafe extern "C" {
164 pub fn clipper_paths64(mem: *mut ::std::os::raw::c_void) -> *mut ClipperPaths64;
165}
166unsafe extern "C" {
167 pub fn clipper_pathsd(mem: *mut ::std::os::raw::c_void) -> *mut ClipperPathsD;
168}
169unsafe extern "C" {
170 pub fn clipper_paths64_of_paths(
171 mem: *mut ::std::os::raw::c_void,
172 paths: *mut *mut ClipperPath64,
173 len_paths: usize,
174 ) -> *mut ClipperPaths64;
175}
176unsafe extern "C" {
177 pub fn clipper_pathsd_of_paths(
178 mem: *mut ::std::os::raw::c_void,
179 paths: *mut *mut ClipperPathD,
180 len_paths: usize,
181 ) -> *mut ClipperPathsD;
182}
183unsafe extern "C" {
184 pub fn clipper_paths64_add_path(paths: *mut ClipperPaths64, p: *mut ClipperPath64);
185}
186unsafe extern "C" {
187 pub fn clipper_pathsd_add_path(paths: *mut ClipperPathsD, p: *mut ClipperPathD);
188}
189unsafe extern "C" {
190 pub fn clipper_paths64_add_paths(a: *mut ClipperPaths64, b: *mut ClipperPaths64);
191}
192unsafe extern "C" {
193 pub fn clipper_pathsd_add_paths(a: *mut ClipperPathsD, b: *mut ClipperPathsD);
194}
195unsafe extern "C" {
196 #[doc = " Path Conversions (to C)"]
197 pub fn clipper_path64_length(path: *mut ClipperPath64) -> usize;
198}
199unsafe extern "C" {
200 pub fn clipper_pathd_length(path: *mut ClipperPathD) -> usize;
201}
202unsafe extern "C" {
203 pub fn clipper_path64_get_point(
204 path: *mut ClipperPath64,
205 idx: ::std::os::raw::c_int,
206 ) -> ClipperPoint64;
207}
208unsafe extern "C" {
209 pub fn clipper_pathd_get_point(
210 path: *mut ClipperPathD,
211 idx: ::std::os::raw::c_int,
212 ) -> ClipperPointD;
213}
214unsafe extern "C" {
215 pub fn clipper_paths64_length(paths: *mut ClipperPaths64) -> usize;
216}
217unsafe extern "C" {
218 pub fn clipper_pathsd_length(paths: *mut ClipperPathsD) -> usize;
219}
220unsafe extern "C" {
221 pub fn clipper_paths64_path_length(
222 paths: *mut ClipperPaths64,
223 idx: ::std::os::raw::c_int,
224 ) -> usize;
225}
226unsafe extern "C" {
227 pub fn clipper_pathsd_path_length(
228 paths: *mut ClipperPathsD,
229 idx: ::std::os::raw::c_int,
230 ) -> usize;
231}
232unsafe extern "C" {
233 pub fn clipper_paths64_get_path(
234 mem: *mut ::std::os::raw::c_void,
235 paths: *mut ClipperPaths64,
236 idx: ::std::os::raw::c_int,
237 ) -> *mut ClipperPath64;
238}
239unsafe extern "C" {
240 pub fn clipper_pathsd_get_path(
241 mem: *mut ::std::os::raw::c_void,
242 paths: *mut ClipperPathsD,
243 idx: ::std::os::raw::c_int,
244 ) -> *mut ClipperPathD;
245}
246unsafe extern "C" {
247 pub fn clipper_paths64_get_point(
248 paths: *mut ClipperPaths64,
249 path_idx: ::std::os::raw::c_int,
250 point_idx: ::std::os::raw::c_int,
251 ) -> ClipperPoint64;
252}
253unsafe extern "C" {
254 pub fn clipper_pathsd_get_point(
255 paths: *mut ClipperPathsD,
256 path_idx: ::std::os::raw::c_int,
257 point_idx: ::std::os::raw::c_int,
258 ) -> ClipperPointD;
259}
260unsafe extern "C" {
261 pub fn clipper_path64_simplify(
262 mem: *mut ::std::os::raw::c_void,
263 path: *mut ClipperPath64,
264 epsilon: f64,
265 is_open_path: ::std::os::raw::c_int,
266 ) -> *mut ClipperPath64;
267}
268unsafe extern "C" {
269 pub fn clipper_pathd_simplify(
270 mem: *mut ::std::os::raw::c_void,
271 path: *mut ClipperPathD,
272 epsilon: f64,
273 is_open_path: ::std::os::raw::c_int,
274 ) -> *mut ClipperPathD;
275}
276unsafe extern "C" {
277 pub fn clipper_paths64_simplify(
278 mem: *mut ::std::os::raw::c_void,
279 paths: *mut ClipperPaths64,
280 epsilon: f64,
281 is_open_paths: ::std::os::raw::c_int,
282 ) -> *mut ClipperPaths64;
283}
284unsafe extern "C" {
285 pub fn clipper_pathsd_simplify(
286 mem: *mut ::std::os::raw::c_void,
287 paths: *mut ClipperPathsD,
288 epsilon: f64,
289 is_open_paths: ::std::os::raw::c_int,
290 ) -> *mut ClipperPathsD;
291}
292unsafe extern "C" {
293 #[doc = " Path Conversions"]
294 pub fn clipper_path64_to_pathd(
295 mem: *mut ::std::os::raw::c_void,
296 path: *mut ClipperPath64,
297 ) -> *mut ClipperPathD;
298}
299unsafe extern "C" {
300 pub fn clipper_pathd_to_path64(
301 mem: *mut ::std::os::raw::c_void,
302 path: *mut ClipperPathD,
303 ) -> *mut ClipperPath64;
304}
305unsafe extern "C" {
306 pub fn clipper_paths64_to_pathsd(
307 mem: *mut ::std::os::raw::c_void,
308 paths: *mut ClipperPaths64,
309 ) -> *mut ClipperPathsD;
310}
311unsafe extern "C" {
312 pub fn clipper_pathsd_to_paths64(
313 mem: *mut ::std::os::raw::c_void,
314 paths: *mut ClipperPathsD,
315 ) -> *mut ClipperPaths64;
316}
317unsafe extern "C" {
318 #[doc = " Minkowski sum: sweep the `pattern` polygon along `path`, returning\n the union of all translated copies of `pattern` placed at every\n vertex of `path`. Geometrically this is { a + b | a in pattern, b\n in path } — useful when you need to grow a shape by an arbitrary\n polygonal kernel rather than the radius-only kernel that\n clipper_paths64_inflate offers.\n\n Set `is_closed` to non-zero when `path` is a closed polygon (the\n usual case for boundary growth, configuration-space obstacles,\n tool-clearance regions); set it to 0 when `path` is an open\n polyline (drag-knife / profile-cutter centerlines, stroke\n generation).\n\n The returned ClipperPaths64 is placement-new constructed into `mem`\n (allocate via clipper_allocate(clipper_paths64_size())) and must be\n released with clipper_delete_paths64. Multi-path output is normal:\n the result can include holes (an outer ring plus inner rings) when\n the swept region encloses a non-swept interior."]
319 pub fn clipper_path64_minkowski_sum(
320 mem: *mut ::std::os::raw::c_void,
321 pattern: *mut ClipperPath64,
322 path: *mut ClipperPath64,
323 is_closed: ::std::os::raw::c_int,
324 ) -> *mut ClipperPaths64;
325}
326unsafe extern "C" {
327 #[doc = " Decimal-coordinate version of clipper_path64_minkowski_sum. The\n `precision` argument selects how many fractional digits are\n preserved when Clipper2 internally scales to integers, runs the\n algorithm, and scales back; see the crate-level \"_64 (i64) vs _D\n (f64) variants\" documentation for the precision / range / quantisation\n tradeoffs. Two decimal places is upstream's default."]
328 pub fn clipper_pathd_minkowski_sum(
329 mem: *mut ::std::os::raw::c_void,
330 pattern: *mut ClipperPathD,
331 path: *mut ClipperPathD,
332 is_closed: ::std::os::raw::c_int,
333 precision: ::std::os::raw::c_int,
334 ) -> *mut ClipperPathsD;
335}
336unsafe extern "C" {
337 #[doc = " Minkowski difference: like clipper_path64_minkowski_sum but\n translates `pattern` by -p instead of +p at each vertex of `path`.\n For a pattern that is symmetric about the origin (e.g. a centred\n disc or square) sum and difference produce the same result; the\n distinction matters as soon as the pattern is asymmetric, where\n difference is the operation you want for \"set of points x such\n that x + pattern is contained in path\" intuitions (robot-footprint\n configuration space, tool-reachability inside a pocket).\n\n Same memory contract as clipper_path64_minkowski_sum."]
338 pub fn clipper_path64_minkowski_diff(
339 mem: *mut ::std::os::raw::c_void,
340 pattern: *mut ClipperPath64,
341 path: *mut ClipperPath64,
342 is_closed: ::std::os::raw::c_int,
343 ) -> *mut ClipperPaths64;
344}
345unsafe extern "C" {
346 #[doc = " Decimal-coordinate version of clipper_path64_minkowski_diff. See\n clipper_pathd_minkowski_sum for the meaning of `precision`."]
347 pub fn clipper_pathd_minkowski_diff(
348 mem: *mut ::std::os::raw::c_void,
349 pattern: *mut ClipperPathD,
350 path: *mut ClipperPathD,
351 is_closed: ::std::os::raw::c_int,
352 precision: ::std::os::raw::c_int,
353 ) -> *mut ClipperPathsD;
354}
355unsafe extern "C" {
356 #[doc = " Multi-path variant of clipper_path64_minkowski_sum. The pattern is\n a single path applied to every input path in `paths`; the per-path\n results are unioned with `fillrule`, so this is exactly equivalent\n to running clipper_path64_minkowski_sum once per input path and\n unioning the outputs — provided here for the common case of a\n scene-wide kernel sweep over many polygons.\n\n Same memory contract as clipper_path64_minkowski_sum."]
357 pub fn clipper_paths64_minkowski_sum(
358 mem: *mut ::std::os::raw::c_void,
359 pattern: *mut ClipperPath64,
360 paths: *mut ClipperPaths64,
361 is_closed: ::std::os::raw::c_int,
362 fillrule: ClipperFillRule,
363 ) -> *mut ClipperPaths64;
364}
365unsafe extern "C" {
366 #[doc = " Decimal-coordinate version of clipper_paths64_minkowski_sum. See\n clipper_pathd_minkowski_sum for the meaning of `precision`."]
367 pub fn clipper_pathsd_minkowski_sum(
368 mem: *mut ::std::os::raw::c_void,
369 pattern: *mut ClipperPathD,
370 paths: *mut ClipperPathsD,
371 is_closed: ::std::os::raw::c_int,
372 precision: ::std::os::raw::c_int,
373 fillrule: ClipperFillRule,
374 ) -> *mut ClipperPathsD;
375}
376unsafe extern "C" {
377 #[doc = " Multi-path variant of clipper_path64_minkowski_diff; same shape as\n clipper_paths64_minkowski_sum."]
378 pub fn clipper_paths64_minkowski_diff(
379 mem: *mut ::std::os::raw::c_void,
380 pattern: *mut ClipperPath64,
381 paths: *mut ClipperPaths64,
382 is_closed: ::std::os::raw::c_int,
383 fillrule: ClipperFillRule,
384 ) -> *mut ClipperPaths64;
385}
386unsafe extern "C" {
387 #[doc = " Decimal-coordinate version of clipper_paths64_minkowski_diff. See\n clipper_pathd_minkowski_sum for the meaning of `precision`."]
388 pub fn clipper_pathsd_minkowski_diff(
389 mem: *mut ::std::os::raw::c_void,
390 pattern: *mut ClipperPathD,
391 paths: *mut ClipperPathsD,
392 is_closed: ::std::os::raw::c_int,
393 precision: ::std::os::raw::c_int,
394 fillrule: ClipperFillRule,
395 ) -> *mut ClipperPathsD;
396}
397unsafe extern "C" {
398 pub fn clipper_pathd_area(path: *mut ClipperPathD) -> f64;
399}
400unsafe extern "C" {
401 pub fn clipper_path64_area(path: *mut ClipperPath64) -> f64;
402}
403unsafe extern "C" {
404 pub fn clipper_pathsd_area(paths: *mut ClipperPathsD) -> f64;
405}
406unsafe extern "C" {
407 pub fn clipper_paths64_area(paths: *mut ClipperPaths64) -> f64;
408}
409unsafe extern "C" {
410 pub fn clipper_point_in_path64(
411 path: *mut ClipperPath64,
412 pt: ClipperPoint64,
413 ) -> ClipperPointInPolygonResult;
414}
415unsafe extern "C" {
416 pub fn clipper_point_in_pathd(
417 path: *mut ClipperPathD,
418 pt: ClipperPointD,
419 ) -> ClipperPointInPolygonResult;
420}
421unsafe extern "C" {
422 #[doc = " PolyTree Constructors"]
423 pub fn clipper_polytree64(
424 mem: *mut ::std::os::raw::c_void,
425 parent: *mut ClipperPolyTree64,
426 ) -> *mut ClipperPolyTree64;
427}
428unsafe extern "C" {
429 pub fn clipper_polytreed(
430 mem: *mut ::std::os::raw::c_void,
431 parent: *mut ClipperPolyTreeD,
432 ) -> *mut ClipperPolyTreeD;
433}
434unsafe extern "C" {
435 #[doc = " PolyTree64 Methods"]
436 pub fn clipper_polytree64_parent(pt: *mut ClipperPolyTree64) -> *const ClipperPolyTree64;
437}
438unsafe extern "C" {
439 pub fn clipper_polytree64_get_child(
440 pt: *mut ClipperPolyTree64,
441 idx: usize,
442 ) -> *const ClipperPolyTree64;
443}
444unsafe extern "C" {
445 pub fn clipper_polytree64_add_child(
446 pt: *mut ClipperPolyTree64,
447 path: *mut ClipperPath64,
448 ) -> *mut ClipperPolyTree64;
449}
450unsafe extern "C" {
451 pub fn clipper_polytree64_count(pt: *mut ClipperPolyTree64) -> usize;
452}
453unsafe extern "C" {
454 pub fn clipper_polytree64_is_hole(pt: *mut ClipperPolyTree64) -> ::std::os::raw::c_int;
455}
456unsafe extern "C" {
457 pub fn clipper_polytree64_polygon(
458 mem: *mut ::std::os::raw::c_void,
459 pt: *mut ClipperPolyTree64,
460 ) -> *mut ClipperPath64;
461}
462unsafe extern "C" {
463 pub fn clipper_polytree64_area(pt: *mut ClipperPolyTree64) -> f64;
464}
465unsafe extern "C" {
466 pub fn clipper_polytree64_to_paths(
467 mem: *mut ::std::os::raw::c_void,
468 pt: *mut ClipperPolyTree64,
469 ) -> *mut ClipperPaths64;
470}
471unsafe extern "C" {
472 #[doc = " PolyTreeD Methods"]
473 pub fn clipper_polytreed_parent(pt: *mut ClipperPolyTreeD) -> *const ClipperPolyTreeD;
474}
475unsafe extern "C" {
476 pub fn clipper_polytreed_get_child(
477 pt: *mut ClipperPolyTreeD,
478 idx: usize,
479 ) -> *const ClipperPolyTreeD;
480}
481unsafe extern "C" {
482 pub fn clipper_polytreed_set_inv_scale(pt: *mut ClipperPolyTreeD, value: f64);
483}
484unsafe extern "C" {
485 pub fn clipper_polytreed_inv_scale(pt: *mut ClipperPolyTreeD) -> f64;
486}
487unsafe extern "C" {
488 pub fn clipper_polytreed_add_child(
489 pt: *mut ClipperPolyTreeD,
490 path: *mut ClipperPath64,
491 ) -> *mut ClipperPolyTreeD;
492}
493unsafe extern "C" {
494 pub fn clipper_polytreed_count(pt: *mut ClipperPolyTreeD) -> usize;
495}
496unsafe extern "C" {
497 pub fn clipper_polytreed_is_hole(pt: *mut ClipperPolyTreeD) -> ::std::os::raw::c_int;
498}
499unsafe extern "C" {
500 pub fn clipper_polytreed_polygon(
501 mem: *mut ::std::os::raw::c_void,
502 pt: *mut ClipperPolyTreeD,
503 ) -> *mut ClipperPathD;
504}
505unsafe extern "C" {
506 pub fn clipper_polytreed_area(pt: *mut ClipperPolyTreeD) -> f64;
507}
508unsafe extern "C" {
509 pub fn clipper_polytreed_to_paths(
510 mem: *mut ::std::os::raw::c_void,
511 pt: *mut ClipperPolyTreeD,
512 ) -> *mut ClipperPathsD;
513}
514unsafe extern "C" {
515 #[doc = " Clipper Contsructors"]
516 pub fn clipper_clipper64(mem: *mut ::std::os::raw::c_void) -> *mut ClipperClipper64;
517}
518unsafe extern "C" {
519 pub fn clipper_clipperd(
520 mem: *mut ::std::os::raw::c_void,
521 precision: ::std::os::raw::c_int,
522 ) -> *mut ClipperClipperD;
523}
524unsafe extern "C" {
525 #[doc = " Clipper64 Setters / Getters"]
526 pub fn clipper_clipper64_set_preserve_collinear(
527 c: *mut ClipperClipper64,
528 t: ::std::os::raw::c_int,
529 );
530}
531unsafe extern "C" {
532 pub fn clipper_clipper64_set_reverse_solution(
533 c: *mut ClipperClipper64,
534 t: ::std::os::raw::c_int,
535 );
536}
537unsafe extern "C" {
538 pub fn clipper_clipper64_get_preserve_collinear(
539 c: *mut ClipperClipper64,
540 ) -> ::std::os::raw::c_int;
541}
542unsafe extern "C" {
543 pub fn clipper_clipper64_get_reverse_solution(
544 c: *mut ClipperClipper64,
545 ) -> ::std::os::raw::c_int;
546}
547unsafe extern "C" {
548 pub fn clipper_clipper64_clear(c: *mut ClipperClipper64);
549}
550unsafe extern "C" {
551 #[doc = " ClipperD Setters / Getters\n"]
552 pub fn clipper_clipperd_set_preserve_collinear(
553 c: *mut ClipperClipperD,
554 t: ::std::os::raw::c_int,
555 );
556}
557unsafe extern "C" {
558 pub fn clipper_clipperd_set_reverse_solution(c: *mut ClipperClipperD, t: ::std::os::raw::c_int);
559}
560unsafe extern "C" {
561 pub fn clipper_clipperd_get_preserve_collinear(
562 c: *mut ClipperClipperD,
563 ) -> ::std::os::raw::c_int;
564}
565unsafe extern "C" {
566 pub fn clipper_clipperd_get_reverse_solution(c: *mut ClipperClipperD) -> ::std::os::raw::c_int;
567}
568unsafe extern "C" {
569 pub fn clipper_clipperd_clear(c: *mut ClipperClipperD);
570}
571unsafe extern "C" {
572 #[doc = " Clipper64 Methods"]
573 pub fn clipper_clipper64_add_subject(c: *mut ClipperClipper64, subjects: *mut ClipperPaths64);
574}
575unsafe extern "C" {
576 pub fn clipper_clipper64_add_open_subject(
577 c: *mut ClipperClipper64,
578 open_subjects: *mut ClipperPaths64,
579 );
580}
581unsafe extern "C" {
582 pub fn clipper_clipper64_add_clip(c: *mut ClipperClipper64, clips: *mut ClipperPaths64);
583}
584unsafe extern "C" {
585 #[doc = " Run the configured boolean operation. Closed-path output is written\n to `closed`; if open-path subjects were added via\n clipper_clipper64_add_open_subject, their offset/intersected portions\n land in `open`. Returns 1 on success, 0 on failure.\n\n For hierarchical (PolyTree) output preserving solid/hole nesting,\n see clipper_clipper64_execute_tree_with_open."]
586 pub fn clipper_clipper64_execute(
587 c64: *mut ClipperClipper64,
588 ct: ClipperClipType,
589 fr: ClipperFillRule,
590 closed: *mut ClipperPaths64,
591 open: *mut ClipperPaths64,
592 ) -> ::std::os::raw::c_int;
593}
594unsafe extern "C" {
595 #[doc = " Run the configured boolean operation, writing closed-path output as\n a hierarchical ClipperPolyTree64 and open-path output (from\n clipper_clipper64_add_open_subject) into the separate ClipperPaths64\n `open`. Use this when you need to know which contours are holes\n inside which solids — that nesting is lost in the flat output of\n clipper_clipper64_execute."]
596 pub fn clipper_clipper64_execute_tree_with_open(
597 c64: *mut ClipperClipper64,
598 ct: ClipperClipType,
599 fr: ClipperFillRule,
600 tree: *mut ClipperPolyTree64,
601 open: *mut ClipperPaths64,
602 ) -> ::std::os::raw::c_int;
603}
604unsafe extern "C" {
605 #[doc = " ClipperD Methods"]
606 pub fn clipper_clipperd_add_subject(c: *mut ClipperClipperD, subjects: *mut ClipperPathsD);
607}
608unsafe extern "C" {
609 pub fn clipper_clipperd_add_open_subject(
610 c: *mut ClipperClipperD,
611 open_subjects: *mut ClipperPathsD,
612 );
613}
614unsafe extern "C" {
615 pub fn clipper_clipperd_add_clip(c: *mut ClipperClipperD, clips: *mut ClipperPathsD);
616}
617unsafe extern "C" {
618 #[doc = " Decimal-coordinate version of clipper_clipper64_execute."]
619 pub fn clipper_clipperd_execute(
620 cD: *mut ClipperClipperD,
621 ct: ClipperClipType,
622 fr: ClipperFillRule,
623 closed: *mut ClipperPathsD,
624 open: *mut ClipperPathsD,
625 ) -> ::std::os::raw::c_int;
626}
627unsafe extern "C" {
628 #[doc = " Decimal-coordinate version of clipper_clipper64_execute_tree_with_open."]
629 pub fn clipper_clipperd_execute_tree_with_open(
630 cD: *mut ClipperClipperD,
631 ct: ClipperClipType,
632 fr: ClipperFillRule,
633 tree: *mut ClipperPolyTreeD,
634 open: *mut ClipperPathsD,
635 ) -> ::std::os::raw::c_int;
636}
637unsafe extern "C" {
638 #[doc = " ClipperOffset Constructors"]
639 pub fn clipper_clipperoffset(
640 mem: *mut ::std::os::raw::c_void,
641 miter_limit: f64,
642 arc_tolerance: f64,
643 preserve_collinear: ::std::os::raw::c_int,
644 reverse_solution: ::std::os::raw::c_int,
645 ) -> *mut ClipperClipperOffset;
646}
647unsafe extern "C" {
648 #[doc = " ClipperOffset Setters / Getters"]
649 pub fn clipper_clipperoffset_set_miter_limit(c: *mut ClipperClipperOffset, l: f64);
650}
651unsafe extern "C" {
652 pub fn clipper_clipperoffset_set_arc_tolerance(c: *mut ClipperClipperOffset, t: f64);
653}
654unsafe extern "C" {
655 pub fn clipper_clipperoffset_set_preserve_collinear(
656 c: *mut ClipperClipperOffset,
657 t: ::std::os::raw::c_int,
658 );
659}
660unsafe extern "C" {
661 pub fn clipper_clipperoffset_set_reverse_solution(
662 c: *mut ClipperClipperOffset,
663 t: ::std::os::raw::c_int,
664 );
665}
666unsafe extern "C" {
667 pub fn clipper_clipperoffset_get_miter_limit(c: *mut ClipperClipperOffset) -> f64;
668}
669unsafe extern "C" {
670 pub fn clipper_clipperoffset_get_arc_tolerance(c: *mut ClipperClipperOffset) -> f64;
671}
672unsafe extern "C" {
673 pub fn clipper_clipperoffset_get_preserve_collinear(
674 c: *mut ClipperClipperOffset,
675 ) -> ::std::os::raw::c_int;
676}
677unsafe extern "C" {
678 pub fn clipper_clipperoffset_get_reverse_solution(
679 c: *mut ClipperClipperOffset,
680 ) -> ::std::os::raw::c_int;
681}
682unsafe extern "C" {
683 pub fn clipper_clipperoffset_error_code(c: *mut ClipperClipperOffset) -> ::std::os::raw::c_int;
684}
685unsafe extern "C" {
686 pub fn clipper_clipperoffset_clear(c: *mut ClipperClipperOffset);
687}
688unsafe extern "C" {
689 #[doc = " ClipperOffset Methods"]
690 pub fn clipper_clipperoffset_add_path64(
691 c: *mut ClipperClipperOffset,
692 p: *mut ClipperPath64,
693 jt: ClipperJoinType,
694 et: ClipperEndType,
695 );
696}
697unsafe extern "C" {
698 pub fn clipper_clipperoffset_add_paths64(
699 c: *mut ClipperClipperOffset,
700 p: *mut ClipperPaths64,
701 jt: ClipperJoinType,
702 et: ClipperEndType,
703 );
704}
705unsafe extern "C" {
706 pub fn clipper_clipperoffset_execute(
707 mem: *mut ::std::os::raw::c_void,
708 c: *mut ClipperClipperOffset,
709 delta: f64,
710 ) -> *mut ClipperPaths64;
711}
712unsafe extern "C" {
713 #[doc = " Bytes required for placement-new construction of a ClipperPath64.\n\n The full clipper_X_size() family follows this pattern: allocate this\n many bytes via clipper_allocate, hand the buffer to a constructor\n like clipper_path64(mem) (which placement-news the C++ object — no\n extra allocation), use the resulting handle, free with the matching\n clipper_delete_path64. See the crate-level \"Memory model\" section\n for the full lifecycle."]
714 pub fn clipper_path64_size() -> usize;
715}
716unsafe extern "C" {
717 pub fn clipper_pathd_size() -> usize;
718}
719unsafe extern "C" {
720 pub fn clipper_paths64_size() -> usize;
721}
722unsafe extern "C" {
723 pub fn clipper_pathsd_size() -> usize;
724}
725unsafe extern "C" {
726 pub fn clipper_polytree64_size() -> usize;
727}
728unsafe extern "C" {
729 pub fn clipper_polytreed_size() -> usize;
730}
731unsafe extern "C" {
732 pub fn clipper_clipper64_size() -> usize;
733}
734unsafe extern "C" {
735 pub fn clipper_clipperd_size() -> usize;
736}
737unsafe extern "C" {
738 pub fn clipper_clipperoffset_size() -> usize;
739}
740unsafe extern "C" {
741 #[doc = " Allocator paired with the clipper_delete_X / clipper_destruct_X\n family. Returns raw bytes that must then be placement-new\n constructed by a clipper_X(mem, ...) call before use.\n\n Memory from clipper_allocate must only be released through:\n - clipper_delete_X(handle): runs the C++ destructor and frees the\n allocation; the most common path.\n - clipper_destruct_X(handle) followed by your own free of the same\n pointer through this same allocator (advanced).\n\n Mixing with libc free or a different allocator is undefined\n behaviour; the C++ side may use a non-system allocator."]
742 pub fn clipper_allocate(size: usize) -> *mut ::std::os::raw::c_void;
743}
744unsafe extern "C" {
745 pub fn clipper_delete_path64(p: *mut ClipperPath64);
746}
747unsafe extern "C" {
748 pub fn clipper_delete_pathd(p: *mut ClipperPathD);
749}
750unsafe extern "C" {
751 pub fn clipper_delete_paths64(p: *mut ClipperPaths64);
752}
753unsafe extern "C" {
754 pub fn clipper_delete_pathsd(p: *mut ClipperPathsD);
755}
756unsafe extern "C" {
757 pub fn clipper_delete_polytree64(p: *mut ClipperPolyTree64);
758}
759unsafe extern "C" {
760 pub fn clipper_delete_polytreed(p: *mut ClipperPolyTreeD);
761}
762unsafe extern "C" {
763 pub fn clipper_delete_clipper64(p: *mut ClipperClipper64);
764}
765unsafe extern "C" {
766 pub fn clipper_delete_clipperd(p: *mut ClipperClipperD);
767}
768unsafe extern "C" {
769 pub fn clipper_delete_clipperoffset(p: *mut ClipperClipperOffset);
770}