1665 y_coords << list.
vertex(i)->
y;
1670 #ifdef QDEBUG_CLIPPER 1671 printf(
"sorted y coords:\n");
1672 for (
int i = 0; i < y_coords.
size(); ++i) {
1673 printf(
"%.9f\n", y_coords[i]);
1681 qreal maxHeight = 0;
1682 for (
int i = 0; i < list.
edgeCount(); ++i) {
1686 if ((edge->
flag & 0x3) == 0x3)
1698 if (height > maxHeight) {
1717 qreal bestY = 0.5 * (y_coords[first] + y_coords[first+1]);
1718 qreal biggestGap = y_coords[first+1] - y_coords[first];
1720 for (
int i = first + 1; i < last; ++i) {
1721 qreal gap = y_coords[i+1] - y_coords[i];
1723 if (gap > biggestGap) {
1724 bestY = 0.5 * (y_coords[i] + y_coords[i+1]);
1729 #ifdef QDEBUG_CLIPPER 1730 printf(
"y: %.9f, gap: %.9f\n", bestY, biggestGap);
static bool fuzzyCompare(qreal a, qreal b)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
InputIterator qFuzzyFind(InputIterator first, InputIterator last, qreal val)
QPathVertex * vertex(int vertex)
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
long ASN1_INTEGER_get ASN1_INTEGER * a
Q_DECL_CONSTEXPR T qAbs(const T &t)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void resize(int size)
Sets the size of the vector to size.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the vector...
void qSort(RandomAccessIterator start, RandomAccessIterator end)
QPathEdge * edge(int edge)
iterator begin()
Returns an STL-style iterator pointing to the first item in the vector.
void reserve(int size)
Attempts to allocate memory for at least size elements.
int size() const
Returns the number of items in the vector.
bool handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode mode)
Iterator qRemoveDuplicates(Iterator begin, Iterator end, Equality eq)