OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::wxColorSorter Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/EncodedFilament.hpp>

Public Member Functions

std::size_t operator() (const wxColour &lhs_it, const wxColour &rhs_it) const noexcept

Detailed Description

Member Function Documentation

◆ operator()()

std::size_t Slic3r::wxColorSorter::operator() ( const wxColour & lhs_it,
const wxColour & rhs_it ) const
inlinenoexcept
65 {
66 ColourHSV ha = wxColourToHSV(lhs_it);
67 ColourHSV hb = wxColourToHSV(rhs_it);
68 if (ha.h != hb.h) return ha.h < hb.h;
69 if (ha.s != hb.s) return ha.s < hb.s;
70 if (ha.v != hb.v) return ha.v < hb.v;
71 if (lhs_it.Alpha() != rhs_it.Alpha()) return lhs_it.Alpha() < rhs_it.Alpha();
72 return false;
73 }
ColourHSV wxColourToHSV(const wxColour &c)
Definition EncodedFilament.hpp:33

References Slic3r::ColourHSV::h, Slic3r::ColourHSV::s, Slic3r::ColourHSV::v, and Slic3r::wxColourToHSV().

Here is the call graph for this function:

The documentation for this struct was generated from the following file: