1 #pragma once
2 
3 #include <cassert>
4 #include <cstdint>
5 #include <list>
6 #include <stdexcept>
7 
8 namespace mapbox {
9 namespace geometry {
10 namespace wagyu {
11 
12 enum clip_type : std::uint8_t {
13     clip_type_intersection = 0,
14     clip_type_union,
15     clip_type_difference,
16     clip_type_x_or
17 };
18 
19 enum polygon_type : std::uint8_t { polygon_type_subject = 0, polygon_type_clip };
20 
21 enum fill_type : std::uint8_t {
22     fill_type_even_odd = 0,
23     fill_type_non_zero,
24     fill_type_positive,
25     fill_type_negative
26 };
27 
28 static double const def_arc_tolerance = 0.25;
29 
30 static int const EDGE_UNASSIGNED = -1; // edge not currently 'owning' a solution
31 static int const EDGE_SKIP = -2;       // edge that would otherwise close a path
32 static std::int64_t const LOW_RANGE = 0x3FFFFFFF;
33 static std::int64_t const HIGH_RANGE = 0x3FFFFFFFFFFFFFFFLL;
34 
35 enum horizontal_direction : std::uint8_t { right_to_left = 0, left_to_right = 1 };
36 
37 enum edge_side : std::uint8_t { edge_left = 0, edge_right };
38 
39 enum join_type : std::uint8_t { join_type_square = 0, join_type_round, join_type_miter };
40 
41 enum end_type {
42     end_type_closed_polygon = 0,
43     end_type_closed_line,
44     end_type_open_butt,
45     end_type_open_square,
46     end_type_open_round
47 };
48 
49 template <typename T>
50 using maxima_list = std::list<T>;
51 }
52 }
53 }
54