26 return std::tie(p0.
y, p0.
x) < std::tie(p1.
y, p1.
x);
30 return std::tie(p0.
x, p0.
y) == std::tie(p1.
x, p1.
y);
34 return std::tie(p0.
x, p0.
y) != std::tie(p1.
x, p1.
y);
47 std::tuple<int32_t, int32_t, int32_t, int32_t>
bounds()
const;
55 constexpr Segment(
const std::tuple<Point, Point>& ps)
57 , fLower{
std::
get<1>(ps)} {
67 return std::tie(s0.fUpper, s0.fLower) < std::tie(s1.fUpper, s1.fLower);
71 return std::tie(s0.fUpper, s0.fLower) == std::tie(s1.fUpper, s1.fLower);
75 return std::tie(s0.fUpper, s0.fLower) != std::tie(s1.fUpper, s1.fLower);
91 Crossing(std::tuple<Segment, Segment> highLow)
92 : fHigher{
std::
get<0>(highLow)}
93 , fLower{
std::
get<1>(highLow)} {}
100 return std::tie(c0.fHigher, c0.fLower) < std::tie(c1.fHigher, c1.fLower);
104 return std::tie(c0.fHigher, c0.fLower) == std::tie(c1.fHigher, c1.fLower);
112template<>
struct std::tuple_size<
myers::Segment> {
116template<
size_t Index>
struct std::tuple_element<Index,
myers::Segment> {
friend bool operator==(const Crossing &c0, const Crossing &c1)
friend bool operator<(const Crossing &c0, const Crossing &c1)
Crossing(const Segment &s0, const Segment &s1)
const Point & upper() const
std::tuple< int32_t, int32_t, int32_t, int32_t > bounds() const
friend constexpr bool operator<(const Segment &s0, const Segment &s1)
friend constexpr bool operator!=(const Segment &s0, const Segment &s1)
friend constexpr bool operator==(const Segment &s0, const Segment &s1)
constexpr Segment(Point p0, Point p1)
bool isHorizontal() const
const Point & lower() const
std::vector< Crossing > brute_force_crossings(SkSpan< Segment >)
const myers::Point & get< 1 >(const myers::Segment &s)
constexpr bool operator<(const Point &p0, const Point &p1)
constexpr bool operator!=(const Point &p0, const Point &p1)
const myers::Point & get< 0 >(const myers::Segment &s)
const myers::Point & get(const myers::Segment &)
std::vector< Crossing > myers_find_crossings(const SkSpan< const Segment > segments)
constexpr bool operator==(const Point &p0, const Point &p1)