| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/painting/qregion.cpp | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | QRegion::QRegion(int x, int y, int w, int h, RegionType t) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | QRegion tmp(QRect(x, y, w, h), t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | tmp.d->ref.ref(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | d = tmp.d; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | void QRegion::detach() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 |     if (d->ref.isShared()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 |         * never executed:  this = copy();*this = copy();never executed:  *this = copy(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | void QRegion::exec(const QByteArray &buffer, int ver, QDataStream::ByteOrder byteOrder) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | QByteArray copy = buffer; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | QDataStream s(©, QIODevice::ReadOnly); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 |     if (ver
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 |         s.setVersion(ver); never executed:  s.setVersion(ver); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | s.setByteOrder(byteOrder); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | QRegion rgn; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | int test_cnt = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 |     while (!s.atEnd()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | qint32 id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 |         if (s.version() == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | int id_int; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | s >> id_int; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | id = id_int; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | s >> id; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 |         if (test_cnt > 0
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 |             QMessageLogger(__FILE__, 293, __PRETTY_FUNCTION__).warning("QRegion::exec: Internal error"); never executed:  QMessageLogger(__FILE__, 293, __PRETTY_FUNCTION__).warning("QRegion::exec: Internal error"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | test_cnt++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 |         if (id == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | s >> r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | rgn = QRegion(r, id == 1 ? Rectangle : Ellipse); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 |         } never executed:   else if (id == 3end of block
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | QPolygon a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | s >> a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | rgn = QRegion(a, id == 4 ? Qt::WindingFill : Qt::OddEvenFill); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 |         } never executed:   else if (id == 5end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | QPoint p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | s >> p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | rgn.translate(p.x(), p.y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 |         } never executed:   else if (id >= 6end of block
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | QByteArray bop1, bop2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | QRegion r1, r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | s >> bop1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | r1.exec(bop1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | s >> bop2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | r2.exec(bop2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | switch (id) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 |                 case never executed:   6:case 6:never executed:  case 6: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | rgn = r1.united(r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 |                     break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 |                 case never executed:   7:case 7:never executed:  case 7: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | rgn = r1.intersected(r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 |                     break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 |                 case never executed:   8:case 8:never executed:  case 8: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | rgn = r1.subtracted(r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 |                     break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 |                 case never executed:   9:case 9:never executed:  case 9: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | rgn = r1.xored(r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 |                     break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 |         } never executed:   else if (id == 10end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | quint32 n; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | s >> n; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 |             for (int i=0; i<(int)n
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | s >> r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | rgn = rgn.united(QRegion(r)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | *this = rgn; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | QDataStream &operator<<(QDataStream &s, const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | QVector<QRect> a = r.rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 |     if (a.isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | s << (quint32)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 |         if (s.version() == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 |             for (i = a.size() - 1; i > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | s << (quint32)(12 + i * 24); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | s << (int)6; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 |             for (i = 0; i < a.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | s << (quint32)(4+8) << (int)1 << a[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | s << (quint32)(4 + 4 + 16 * a.size()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | s << (qint32)10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | s << a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 |     return never executed:   s;return s;never executed:  return s; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | QDataStream &operator>>(QDataStream &s, QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | QByteArray b; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | s >> b; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | r.exec(b, s.version(), s.byteOrder()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 |     return never executed:   s;return s;never executed:  return s; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | QDebug operator<<(QDebug s, const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | QDebugStateSaver saver(s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | s.nospace(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | s << "QRegion("; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 |     if (r.isNull()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | s << "null"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 |     } never executed:   else if (r.isEmpty()end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | s << "empty"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | const QVector<QRect> rects = r.rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | const int count = rects.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 |         if (count > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 |             s << "size=" << count << ", bounds=("; never executed:  s << "size=" << count << ", bounds=("; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | QtDebugUtils::formatQRect(s, r.boundingRect()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 |         if (count > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | s << ") - ["; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 |             for (int i = 0; i < count
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 |                 if (i
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 |                     s << ", "; never executed:  s << ", "; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | s << '('; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | QtDebugUtils::formatQRect(s, rects.at(i)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | s << ')'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | s << ']'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | s << ')'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 |     return never executed:   s;return s;never executed:  return s; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | QRegion QRegion::operator|(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 |     { return never executed:   united(r);return united(r);never executed:   }return united(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | QRegion QRegion::operator+(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 |     { return never executed:   united(r);return united(r);never executed:   }return united(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | QRegion QRegion::operator+(const QRect &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 |     { return never executed:   united(r);return united(r);never executed:   }return united(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | QRegion QRegion::operator&(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 |     { return never executed:   intersected(r);return intersected(r);never executed:   }return intersected(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | QRegion QRegion::operator&(const QRect &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 |     return never executed:   intersected(r);return intersected(r);never executed:  return intersected(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | QRegion QRegion::operator-(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 |     { return never executed:   subtracted(r);return subtracted(r);never executed:   }return subtracted(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | QRegion QRegion::operator^(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 |     { return never executed:   xored(r);return xored(r);never executed:   }return xored(r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | QRegion& QRegion::operator|=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 |     { return never executed:   *this = *this | r;return *this = *this | r;never executed:   }return *this = *this | r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | QRegion& QRegion::operator&=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 |     { return never executed:   *this = *this & r;return *this = *this & r;never executed:   }return *this = *this & r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | QRegion& QRegion::operator&=(const QRect &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 |     return never executed:   *this = *this & r;return *this = *this & r;never executed:  return *this = *this & r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | QRegion& QRegion::operator-=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 |     { return never executed:   *this = *this - r;return *this = *this - r;never executed:   }return *this = *this - r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | QRegion& QRegion::operator^=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 |     { return never executed:   *this = *this ^ r;return *this = *this ^ r;never executed:   }return *this = *this ^ r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | QRegion::operator QVariant() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 |     return never executed:   QVariant(QVariant::Region, this);return QVariant(QVariant::Region, this);never executed:  return QVariant(QVariant::Region, this); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | QRegion | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | QRegion::translated(int dx, int dy) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | QRegion ret(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | ret.translate(dx, dy); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 |     return never executed:   ret;return ret;never executed:  return ret; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | inline bool rect_intersects(const QRect &r1, const QRect &r2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 |     return never executed:   (r1.right() >= r2.left()return (r1.right() >= r2.left() && r1.left() <= r2.right() && r1.bottom() >= r2.top() && r1.top() <= r2.bottom());
 
 never executed:  return (r1.right() >= r2.left() && r1.left() <= r2.right() && r1.bottom() >= r2.top() && r1.top() <= r2.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 |             r1.bottom() >= r2.top()
 
 never executed:  return (r1.right() >= r2.left() && r1.left() <= r2.right() && r1.bottom() >= r2.top() && r1.top() <= r2.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | bool QRegion::intersects(const QRegion ®ion) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 |     if (isEmpty()
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 |     if (!rect_intersects(boundingRect(), region.boundingRect())
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 |     if (rectCount() == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | const QVector<QRect> myRects = rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | const QVector<QRect> otherRects = region.rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 |     for (QVector<QRect>::const_iterator i1 = myRects.constBegin(); i1 < myRects.constEnd()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 |         for (QVector<QRect>::const_iterator i2 = otherRects.constBegin(); i2 < otherRects.constEnd()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 |             if (rect_intersects(*i1, *i2)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 |                 return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | namespace { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | struct Segment | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | Segment() {} | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | Segment(const QPoint &p) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | : added(false) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | , point(p) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | int left() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 |         return never executed:   qMin(point.x(), next->point.x());return qMin(point.x(), next->point.x());never executed:  return qMin(point.x(), next->point.x()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | int right() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 |         return never executed:   qMax(point.x(), next->point.x());return qMax(point.x(), next->point.x());never executed:  return qMax(point.x(), next->point.x()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | bool overlaps(const Segment &other) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 |         return never executed:   left() < other.right()return left() < other.right() && other.left() < right();
 
 never executed:  return left() < other.right() && other.left() < right(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | void connect(Segment &other) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | next = &other; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | other.prev = this; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | horizontal = (point.y() == other.point.y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | void merge(Segment &other) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 |         if (right() <= other.right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | QPoint p = other.point; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | Segment *oprev = other.prev; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | other.point = point; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | other.prev = prev; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | prev->next = &other; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | point = p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | prev = oprev; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | oprev->next = this; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | Segment *onext = other.next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | other.next = next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | next->prev = &other; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | next = onext; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | next->prev = this; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | int horizontal : 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | int added : 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | QPoint point; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | Segment *prev; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | Segment *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | void mergeSegments(Segment *a, int na, Segment *b, int nb) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | int i = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | int j = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 |     while (i != na
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | Segment &sa = a[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | Segment &sb = b[j]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | const int ra = sa.right(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | const int rb = sb.right(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 |         if (sa.overlaps(sb)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 |             sa.merge(sb); never executed:  sa.merge(sb); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | i += (rb >= ra); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | j += (ra >= rb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | void addSegmentsToPath(Segment *segment, QPainterPath &path) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | Segment *current = segment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | path.moveTo(current->point); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | current->added = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | Segment *last = current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | current = current->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 |     while (current != segment
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 |         if (current->horizontal != last->horizontal
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 |             path.lineTo(current->point); never executed:  path.lineTo(current->point); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | current->added = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | last = current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | current = current->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | __attribute__((visibility("default"))) QPainterPath qt_regionToPath(const QRegion ®ion) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | QPainterPath result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 |     if (region.rectCount() == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | result.addRect(region.boundingRect()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | const QVector<QRect> rects = region.rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | QVarLengthArray<Segment> segments; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | segments.resize(4 * rects.size()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | const QRect *rect = rects.constData(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | const QRect *end = rect + rects.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | int lastRowSegmentCount = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | Segment *lastRowSegments = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | int lastSegment = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | int lastY = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 |     while (rect != end
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | const int y = rect[0].y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | int count = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 |         while (&rect[count] != end
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 |             ++ never executed:  count;++count;never executed:  ++count; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 |         for (int i = 0; i < count
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | int offset = lastSegment + i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | segments[offset] = Segment(rect[i].topLeft()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | segments[offset += count] = Segment(rect[i].topRight() + QPoint(1, 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | segments[offset += count] = Segment(rect[i].bottomRight() + QPoint(1, 1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | segments[offset += count] = Segment(rect[i].bottomLeft() + QPoint(0, 1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | offset = lastSegment + i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 |             for (int j = 0; j < 4
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 |                 segments[offset + j * count].connect(segments[offset + ((j + 1) % 4) * count]); never executed:  segments[offset + j * count].connect(segments[offset + ((j + 1) % 4) * count]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 |         if (lastRowSegments
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 |             mergeSegments(lastRowSegments, lastRowSegmentCount, &segments[lastSegment], count); never executed:  mergeSegments(lastRowSegments, lastRowSegmentCount, &segments[lastSegment], count); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | lastRowSegments = &segments[lastSegment + 2 * count]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | lastRowSegmentCount = count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | lastSegment += 4 * count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | lastY = y + rect[0].height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | rect += count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 |     for (int i = 0; i < lastSegment
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | Segment *segment = &segments[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 |         if (!segment->added
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 |             addSegmentsToPath(segment, result); never executed:  addSegmentsToPath(segment, result); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | struct QRegionPrivate { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | int numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | int innerArea; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | QVector<QRect> rects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | QRect extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | QRect innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 |     inline QRegionPrivate() : numRects(0), innerArea(-1) {} never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | inline QRegionPrivate(const QRect &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | : numRects(1), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | innerArea(r.width() * r.height()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | extents(r), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | innerRect(r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | void intersect(const QRect &r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | inline bool contains(const QRegionPrivate &r) const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 |         return never executed:   contains(r.extents);return contains(r.extents);never executed:  return contains(r.extents); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | inline bool contains(const QRect &r2) const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | const QRect &r1 = innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 |         return never executed:   r2.left() >= r1.left()return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom();
 
 never executed:  return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 |             && r2.top() >= r1.top()
 
 never executed:  return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | inline bool within(const QRect &r1) const { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | const QRect &r2 = extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 |         return never executed:   r2.left() >= r1.left()return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom();
 
 never executed:  return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 |             && r2.top() >= r1.top()
 
 never executed:  return r2.left() >= r1.left() && r2.right() <= r1.right() && r2.top() >= r1.top() && r2.bottom() <= r1.bottom(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | inline void updateInnerRect(const QRect &rect) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | const int area = rect.width() * rect.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 |         if (area > innerArea
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | innerArea = area; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | innerRect = rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | inline void vectorize() { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 |         if (numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 |             if (!rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 |                 rects.resize(1); never executed:  rects.resize(1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | rects[0] = extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | inline void append(const QRect *r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | void append(const QRegionPrivate *r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | void prepend(const QRect *r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | void prepend(const QRegionPrivate *r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | inline bool canAppend(const QRect *r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | inline bool canAppend(const QRegionPrivate *r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | inline bool canPrepend(const QRect *r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | inline bool canPrepend(const QRegionPrivate *r) const; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | inline bool mergeFromRight(QRect *left, const QRect *right); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | inline bool mergeFromLeft(QRect *left, const QRect *right); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | inline bool mergeFromBelow(QRect *top, const QRect *bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | const QRect *nextToTop, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | const QRect *nextToBottom); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | inline bool mergeFromAbove(QRect *bottom, const QRect *top, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 459 | const QRect *nextToBottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 460 | const QRect *nextToTop); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 462 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 465 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 466 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 467 | static inline bool isEmptyHelper(const QRegionPrivate *preg) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 468 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 469 |     return never executed:   !pregreturn !preg || preg->numRects == 0;
 
 never executed:  return !preg || preg->numRects == 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 470 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 471 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 472 | static inline bool canMergeFromRight(const QRect *left, const QRect *right) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 473 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 474 |     return never executed:   (right->top() == left->top()return (right->top() == left->top() && right->bottom() == left->bottom() && right->left() <= (left->right() + 1));
 never executed:  return (right->top() == left->top() && right->bottom() == left->bottom() && right->left() <= (left->right() + 1)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 475 |             && right->bottom() == left->bottom()
 never executed:  return (right->top() == left->top() && right->bottom() == left->bottom() && right->left() <= (left->right() + 1)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 476 |             && right->left() <= (left->right() + 1)
 never executed:  return (right->top() == left->top() && right->bottom() == left->bottom() && right->left() <= (left->right() + 1)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 477 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 479 | static inline bool canMergeFromLeft(const QRect *right, const QRect *left) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 480 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 481 |     return never executed:   canMergeFromRight(left, right);return canMergeFromRight(left, right);never executed:  return canMergeFromRight(left, right); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 482 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 483 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 484 | bool QRegionPrivate::mergeFromRight(QRect *left, const QRect *right) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 485 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 486 |     if (canMergeFromRight(left, right)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 487 | left->setRight(right->right()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 488 | updateInnerRect(*left); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 489 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 490 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 491 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 492 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 493 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 494 | bool QRegionPrivate::mergeFromLeft(QRect *right, const QRect *left) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 495 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 496 |     if (canMergeFromLeft(right, left)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 497 | right->setLeft(left->left()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 498 | updateInnerRect(*right); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 499 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 500 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 501 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 502 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 503 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 504 | static inline bool canMergeFromBelow(const QRect *top, const QRect *bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 505 | const QRect *nextToTop, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 506 | const QRect *nextToBottom) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 507 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 508 |     if (nextToTop
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 509 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 510 |     if (nextToBottom
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 511 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 513 |     return never executed:   ((return ((top->bottom() >= (bottom->top() - 1)) && top->left() == bottom->left() && top->right() == bottom->right());
 
 never executed:  return ((top->bottom() >= (bottom->top() - 1)) && top->left() == bottom->left() && top->right() == bottom->right()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 514 |             && top->left() == bottom->left()
 never executed:  return ((top->bottom() >= (bottom->top() - 1)) && top->left() == bottom->left() && top->right() == bottom->right()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 515 |             && top->right() == bottom->right()
 never executed:  return ((top->bottom() >= (bottom->top() - 1)) && top->left() == bottom->left() && top->right() == bottom->right()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 516 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 518 | bool QRegionPrivate::mergeFromBelow(QRect *top, const QRect *bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 519 | const QRect *nextToTop, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 520 | const QRect *nextToBottom) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 521 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 522 |     if (canMergeFromBelow(top, bottom, nextToTop, nextToBottom)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 523 | top->setBottom(bottom->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 524 | updateInnerRect(*top); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 525 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 526 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 527 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 528 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 530 | bool QRegionPrivate::mergeFromAbove(QRect *bottom, const QRect *top, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 531 | const QRect *nextToBottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 532 | const QRect *nextToTop) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 533 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 534 |     if (canMergeFromBelow(top, bottom, nextToTop, nextToBottom)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 535 | bottom->setTop(top->top()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 536 | updateInnerRect(*bottom); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 537 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 538 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 539 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 540 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 541 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 542 | static inline QRect qt_rect_intersect_normalized(const QRect &r1, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 543 | const QRect &r2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 544 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 545 | QRect r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 546 | r.setLeft(qMax(r1.left(), r2.left())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 547 | r.setRight(qMin(r1.right(), r2.right())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 548 | r.setTop(qMax(r1.top(), r2.top())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 549 | r.setBottom(qMin(r1.bottom(), r2.bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 550 |     return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 551 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 553 | void QRegionPrivate::intersect(const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 554 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 555 | ((!(extents.intersects(rect))) ? qt_assert("extents.intersects(rect)",__FILE__,1269) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 556 | ((!(numRects > 1)) ? qt_assert("numRects > 1",__FILE__,1270) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 560 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 561 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 562 | const QRect r = rect.normalized(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 563 | extents = QRect(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 564 | innerRect = QRect(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 565 | innerArea = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 567 | QRect *dest = rects.data(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 568 | const QRect *src = dest; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 569 | int n = numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 570 | numRects = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 571 |     while (n--
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 572 | *dest = qt_rect_intersect_normalized(*src++, r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 573 |         if (dest->isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 574 |             continue; never executed:  continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 575 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 576 |         if (numRects == 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 577 | extents = *dest; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 578 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 579 | extents.setLeft(qMin(extents.left(), dest->left())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 582 | extents.setRight(qMax(extents.right(), dest->right())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 583 | extents.setBottom(qMax(extents.bottom(), dest->bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 585 |             const QRect *nextToLast = (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 586 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 588 |             if (canMergeFromBelow(dest - 1, dest, nextToLast, 0)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 589 |                 if (!n
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 590 | QRect *prev = dest - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 591 | prev->setBottom(dest->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 592 | updateInnerRect(*prev); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 593 |                     continue; never executed:  continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 594 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 595 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 596 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 597 | updateInnerRect(*dest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 598 | ++dest; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 599 | ++numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 600 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 601 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 602 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 603 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 604 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 605 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 606 | void QRegionPrivate::append(const QRect *r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 607 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 608 | ((!(!r->isEmpty())) ? qt_assert("!r->isEmpty()",__FILE__,1322) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 609 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 610 |     QRect *myLast = (numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 611 |     if (mergeFromRight(myLast, r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 612 |         if (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 613 |             const QRect *nextToTop = (numRects > 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 614 |             if (mergeFromBelow(myLast - 1, myLast, nextToTop, 0)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 615 |                 -- never executed:  numRects;--numRects;never executed:  --numRects; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 616 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 617 |     } never executed:   else if (mergeFromBelow(myLast, r, (numRects > 1 ? myLast - 1 : 0), 0)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 619 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 620 | vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 621 | ++numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 622 | updateInnerRect(*r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 623 |         if (rects.size() < numRects
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 624 |             rects.resize(numRects); never executed:  rects.resize(numRects); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 625 | rects[numRects - 1] = *r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 626 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 627 | extents.setCoords(qMin(extents.left(), r->left()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 628 | qMin(extents.top(), r->top()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 629 | qMax(extents.right(), r->right()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 630 | qMax(extents.bottom(), r->bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 632 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 633 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 635 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 637 | void QRegionPrivate::append(const QRegionPrivate *r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 638 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 639 | ((!(!isEmptyHelper(r))) ? qt_assert("!isEmptyHelper(r)",__FILE__,1353) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 641 |     if (r->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 642 | append(&r->extents); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 643 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 644 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 645 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 646 | vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 648 | QRect *destRect = rects.data() + numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 649 | const QRect *srcRect = r->rects.constData(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 650 | int numAppend = r->numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 653 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 654 | const QRect *rFirst = srcRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 655 | QRect *myLast = destRect - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 656 |         const QRect *nextToLast = (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 657 |         if (mergeFromRight(myLast, rFirst)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 658 | ++srcRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 659 | --numAppend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 660 |             const QRect *rNextToFirst = (numAppend > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 661 |             if (mergeFromBelow(myLast, rFirst + 1, nextToLast, rNextToFirst)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 662 | ++srcRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 663 | --numAppend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 664 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 665 |             if (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 666 |                 nextToLast = (numRects > 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 667 |                 rNextToFirst = (numAppend > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 668 |                 if (mergeFromBelow(myLast - 1, myLast, nextToLast, rNextToFirst)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 669 | --destRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 670 | --numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 671 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 672 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 673 |         } never executed:   else if (mergeFromBelow(myLast, rFirst, nextToLast, rFirst + 1)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 674 | ++srcRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 675 | --numAppend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 676 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 677 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 680 |     if (numAppend > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 681 | const int newNumRects = numRects + numAppend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 682 |         if (newNumRects > rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 683 | rects.resize(newNumRects); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 684 | destRect = rects.data() + numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 685 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 686 | memcpy(destRect, srcRect, numAppend * sizeof(QRect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 687 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 688 | numRects = newNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 689 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 690 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 691 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 692 |     if (innerArea < r->innerArea
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 693 | innerArea = r->innerArea; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 694 | innerRect = r->innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 695 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 696 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 697 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 698 | destRect = &extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 699 | srcRect = &r->extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 700 | extents.setCoords(qMin(destRect->left(), srcRect->left()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 701 | qMin(destRect->top(), srcRect->top()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 702 | qMax(destRect->right(), srcRect->right()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 703 | qMax(destRect->bottom(), srcRect->bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 704 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 706 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 708 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 709 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 710 | void QRegionPrivate::prepend(const QRegionPrivate *r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 711 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 712 | ((!(!isEmptyHelper(r))) ? qt_assert("!isEmptyHelper(r)",__FILE__,1426) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 713 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 714 |     if (r->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 715 | prepend(&r->extents); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 716 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 717 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 719 | vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 720 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 721 | int numPrepend = r->numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 722 | int numSkip = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 725 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 726 | QRect *myFirst = rects.data(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 727 |         const QRect *nextToFirst = (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 728 | const QRect *rLast = r->rects.constData() + r->numRects - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 729 |         const QRect *rNextToLast = (r->numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 730 |         if (mergeFromLeft(myFirst, rLast)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 731 | --numPrepend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 732 | --rLast; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 733 |             rNextToLast = (numPrepend > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 734 |             if (mergeFromAbove(myFirst, rLast, nextToFirst, rNextToLast)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 735 | --numPrepend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 736 | --rLast; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 737 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 738 |             if (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 739 |                 nextToFirst = (numRects > 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 740 |                 rNextToLast = (numPrepend > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 741 |                 if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, rNextToLast)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 742 | --numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 743 | ++numSkip; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 744 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 745 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 746 |         } never executed:   else if (mergeFromAbove(myFirst, rLast, nextToFirst, rNextToLast)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 747 | --numPrepend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 748 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 749 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 751 |     if (numPrepend > 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 752 | const int newNumRects = numRects + numPrepend; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 753 |         if (newNumRects > rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 754 |             rects.resize(newNumRects); never executed:  rects.resize(newNumRects); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 757 | memmove(rects.data() + numPrepend, rects.constData() + numSkip, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 758 | numRects * sizeof(QRect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 761 | memcpy(rects.data(), r->rects.constData(), numPrepend * sizeof(QRect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 762 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 763 | numRects = newNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 764 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 765 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 767 |     if (innerArea < r->innerArea
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 768 | innerArea = r->innerArea; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 769 | innerRect = r->innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 770 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 771 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 773 | extents.setCoords(qMin(extents.left(), r->extents.left()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 774 | qMin(extents.top(), r->extents.top()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 775 | qMax(extents.right(), r->extents.right()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 776 | qMax(extents.bottom(), r->extents.bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 778 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 779 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 781 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 783 | void QRegionPrivate::prepend(const QRect *r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 784 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 785 | ((!(!r->isEmpty())) ? qt_assert("!r->isEmpty()",__FILE__,1499) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 786 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 787 |     QRect *myFirst = (numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 788 |     if (mergeFromLeft(myFirst, r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 789 |         if (numRects > 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 790 |             const QRect *nextToFirst = (numRects > 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 791 |             if (mergeFromAbove(myFirst + 1, myFirst, nextToFirst, 0)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 792 | --numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 793 | memmove(rects.data(), rects.constData() + 1, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 794 | numRects * sizeof(QRect)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 795 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 796 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 797 |     } never executed:   else if (mergeFromAbove(myFirst, r, (numRects > 1 ? myFirst + 1 : 0), 0)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 798 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 799 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 800 | vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 801 | ++numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 802 | updateInnerRect(*r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 803 | rects.prepend(*r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 804 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 805 | extents.setCoords(qMin(extents.left(), r->left()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 806 | qMin(extents.top(), r->top()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 807 | qMax(extents.right(), r->right()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 808 | qMax(extents.bottom(), r->bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 812 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 813 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 814 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 815 | bool QRegionPrivate::canAppend(const QRect *r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 816 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 817 | ((!(!r->isEmpty())) ? qt_assert("!r->isEmpty()",__FILE__,1531) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 818 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 819 |     const QRect *myLast = (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 820 |     if (r->top() > myLast->bottom()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 821 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 822 |     if (r->top() == myLast->top()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 823 |         && r->height() == myLast->height()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 824 |         && r->left() > myLast->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 825 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 826 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 827 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 828 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 829 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 830 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 832 | bool QRegionPrivate::canAppend(const QRegionPrivate *r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 833 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 834 |     return never executed:   canAppend(r->numRects == 1 ? &r->extents : r->rects.constData());return canAppend(r->numRects == 1 ? &r->extents : r->rects.constData());never executed:  return canAppend(r->numRects == 1 ? &r->extents : r->rects.constData()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 835 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 837 | bool QRegionPrivate::canPrepend(const QRect *r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 838 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 839 | ((!(!r->isEmpty())) ? qt_assert("!r->isEmpty()",__FILE__,1553) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 841 |     const QRect *myFirst = (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 842 |     if (r->bottom() < myFirst->top()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 843 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 844 |     if (r->top() == myFirst->top()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 845 |         && r->height() == myFirst->height()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 846 |         && r->right() < myFirst->left()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 847 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 848 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 849 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 850 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 851 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 852 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 854 | bool QRegionPrivate::canPrepend(const QRegionPrivate *r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 855 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 856 |     return never executed:   canPrepend(r->numRects == 1 ? &r->extents : r->rects.constData() + r->numRects - 1);return canPrepend(r->numRects == 1 ? &r->extents : r->rects.constData() + r->numRects - 1);never executed:  return canPrepend(r->numRects == 1 ? &r->extents : r->rects.constData() + r->numRects - 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 857 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 858 | static QRegionPrivate qrp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 859 | const QRegion::QRegionData QRegion::shared_empty = {{ { -1 } }, &qrp}; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 860 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 861 | typedef void (*OverlapFunc)(QRegionPrivate &dest, const QRect *r1, const QRect *r1End, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 862 | const QRect *r2, const QRect *r2End, int y1, int y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 863 | typedef void (*NonOverlapFunc)(QRegionPrivate &dest, const QRect *r, const QRect *rEnd, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 864 | int y1, int y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 865 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 866 | static bool EqualRegion(const QRegionPrivate *r1, const QRegionPrivate *r2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 867 | static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 868 | static void miRegionOp(QRegionPrivate &dest, const QRegionPrivate *reg1, const QRegionPrivate *reg2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 869 | OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 870 | NonOverlapFunc nonOverlap2Func); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 871 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 872 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 873 | typedef struct _POINTBLOCK { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 874 | char data[200 * sizeof(QPoint)]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 875 | QPoint *pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 876 | struct _POINTBLOCK *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 877 | } POINTBLOCK; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 878 | static void UnionRectWithRegion(const QRect *rect, const QRegionPrivate *source, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 879 | QRegionPrivate &dest) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 880 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 881 |     if (rect->isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 882 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 883 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 884 | ((!(EqualRegion(source, &dest))) ? qt_assert("EqualRegion(source, &dest)",__FILE__,1824) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 885 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 886 |     if (dest.numRects == 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 887 | dest = QRegionPrivate(*rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 888 |     } never executed:   else if (dest.canAppend(rect)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 889 | dest.append(rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 890 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 891 | QRegionPrivate p(*rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 892 | UnionRegion(&p, source, dest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 893 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 894 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 895 | static void miSetExtents(QRegionPrivate &dest) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 896 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 897 | const QRect *pBox, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 898 | *pBoxEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 899 | QRect *pExtents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 900 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 901 | dest.innerRect.setCoords(0, 0, -1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 902 | dest.innerArea = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 903 |     if (dest.numRects == 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 904 | dest.extents.setCoords(0, 0, -1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 905 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 906 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 907 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 908 | pExtents = &dest.extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 909 |     if (dest.rects.isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 910 |         pBox = &dest.extents; never executed:  pBox = &dest.extents; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 911 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 912 |         pBox = dest.rects.constData(); never executed:  pBox = dest.rects.constData(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 913 | pBoxEnd = pBox + dest.numRects - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 914 | pExtents->setLeft(pBox->left()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 915 | pExtents->setTop(pBox->top()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 916 | pExtents->setRight(pBoxEnd->right()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 917 | pExtents->setBottom(pBoxEnd->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 918 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 919 | ((!(pExtents->top() <= pExtents->bottom())) ? qt_assert("pExtents->top() <= pExtents->bottom()",__FILE__,1883) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 920 |     while (pBox <= pBoxEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 921 |         if (pBox->left() < pExtents->left()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 922 |             pExtents->setLeft(pBox->left()); never executed:  pExtents->setLeft(pBox->left()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 923 |         if (pBox->right() > pExtents->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 924 |             pExtents->setRight(pBox->right()); never executed:  pExtents->setRight(pBox->right()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 925 | dest.updateInnerRect(*pBox); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 926 | ++pBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 927 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 928 | ((!(pExtents->left() <= pExtents->right())) ? qt_assert("pExtents->left() <= pExtents->right()",__FILE__,1892) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 929 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 930 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 931 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 934 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 936 | static void OffsetRegion(QRegionPrivate ®ion, int x, int y) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 937 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 938 |     if (region.rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 939 | QRect *pbox = region.rects.data(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 940 | int nbox = region.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 942 |         while (nbox--
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 943 | pbox->translate(x, y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 944 | ++pbox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 945 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 946 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 947 | region.extents.translate(x, y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 948 | region.innerRect.translate(x, y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 949 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 950 | static void miIntersectO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 951 | const QRect *r2, const QRect *r2End, int y1, int y2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 952 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 953 | int x1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 954 | int x2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 955 | QRect *pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 956 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 957 | pNextRect = dest.rects.data() + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 958 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 959 |     while (r1 != r1End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 960 | x1 = qMax(r1->left(), r2->left()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 961 | x2 = qMin(r1->right(), r2->right()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 962 |         if (x1 <= x2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 963 | ((!(y1 <= y2)) ? qt_assert("y1 <= y2",__FILE__,1952) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 964 |             { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 965 | pNextRect->setCoords(x1, y1, x2, y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 966 | ++dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 967 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 968 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 969 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 970 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 971 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 972 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 973 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 974 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 975 |         if (r1->right() < r2->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 976 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 977 |         } never executed:   else if (r2->right() < r1->right()end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 978 | ++r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 979 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 980 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 981 | ++r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 982 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 983 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 984 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 985 | static int miCoalesce(QRegionPrivate &dest, int prevStart, int curStart) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 986 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 987 | QRect *pPrevBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 988 | QRect *pCurBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 989 | QRect *pRegEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 990 | int curNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 991 | int prevNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 992 | int bandY1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 993 | QRect *rData = dest.rects.data(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 994 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 995 | pRegEnd = rData + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 996 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 997 | pPrevBox = rData + prevStart; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 998 | prevNumRects = curStart - prevStart; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1000 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1001 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1004 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1005 | pCurBox = rData + curStart; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1006 | bandY1 = pCurBox->top(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1007 |     for (curNumRects = 0; pCurBox != pRegEnd
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1008 | ++pCurBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1009 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1011 |     if (pCurBox != pRegEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1013 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1014 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1015 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1016 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1017 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1018 | --pRegEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1019 |         while ((
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1020 |             -- never executed:  pRegEnd;--pRegEnd;never executed:  --pRegEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1021 | curStart = pRegEnd - rData; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1022 | pRegEnd = rData + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1023 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1025 |     if (curNumRects == prevNumRects
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1026 | pCurBox -= curNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1028 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1029 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1030 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1031 |         if (pPrevBox->bottom() == pCurBox->top() - 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1032 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1034 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1035 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1036 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1037 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1038 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1039 |                 if (pPrevBox->left() != pCurBox->left()
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1041 |                     return never executed:   curStart;return curStart;never executed:  return curStart; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1042 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1043 | ++pPrevBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1044 | ++pCurBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1045 | --prevNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1046 |             } never executed:   while (prevNumRects != 0end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1047 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1048 | dest.numRects -= curNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1049 | pCurBox -= curNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1050 | pPrevBox -= curNumRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1051 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1052 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1053 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1054 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1055 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1056 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1057 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1058 | pPrevBox->setBottom(pCurBox->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1059 | dest.updateInnerRect(*pPrevBox); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1060 | ++pPrevBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1061 | ++pCurBox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1062 | curNumRects -= 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1063 |             } never executed:   while (curNumRects != 0end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1064 |             if (pCurBox == pRegEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1065 | curStart = prevStart; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1066 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1067 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1068 | *pPrevBox++ = *pCurBox++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1069 | dest.updateInnerRect(*pPrevBox); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1070 |                 } never executed:   while (pCurBox != pRegEndend of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1071 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1072 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1073 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1074 |     return never executed:   curStart;return curStart;never executed:  return curStart; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1075 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1076 | static void miRegionOp(QRegionPrivate &dest, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1077 | const QRegionPrivate *reg1, const QRegionPrivate *reg2, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1078 | OverlapFunc overlapFunc, NonOverlapFunc nonOverlap1Func, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1079 | NonOverlapFunc nonOverlap2Func) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1080 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1081 | const QRect *r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1082 | const QRect *r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1083 | const QRect *r1End; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1084 | const QRect *r2End; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1085 | int ybot; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1086 | int ytop; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1087 | int prevBand; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1088 | int curBand; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1089 | const QRect *r1BandEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1090 | const QRect *r2BandEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1091 | int top; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1092 | int bot; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1093 |     if (reg1->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1094 |         r1 = ®1->extents; never executed:  r1 = ®1->extents; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1095 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1096 |         r1 = reg1->rects.constData(); never executed:  r1 = reg1->rects.constData(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1097 |     if (reg2->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1098 |         r2 = ®2->extents; never executed:  r2 = ®2->extents; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1099 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1100 |         r2 = reg2->rects.constData(); never executed:  r2 = reg2->rects.constData(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1102 | r1End = r1 + reg1->numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1103 | r2End = r2 + reg2->numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1104 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1105 | dest.vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1106 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1107 | QVector<QRect> oldRects = dest.rects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1109 | dest.numRects = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1110 | dest.rects.resize(qMax(reg1->numRects,reg2->numRects) * 2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1111 |     if (reg1->extents.top() < reg2->extents.top()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1112 |         ybot = reg1->extents.top() - 1; never executed:  ybot = reg1->extents.top() - 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1113 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1114 |         ybot = reg2->extents.top() - 1; never executed:  ybot = reg2->extents.top() - 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1115 | prevBand = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1117 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1118 | curBand = dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1119 | r1BandEnd = r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1120 |         while (r1BandEnd != r1End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1121 |             ++ never executed:  r1BandEnd;++r1BandEnd;never executed:  ++r1BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1123 | r2BandEnd = r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1124 |         while (r2BandEnd != r2End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1125 |             ++ never executed:  r2BandEnd;++r2BandEnd;never executed:  ++r2BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1126 |         if (r1->top() < r2->top()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1127 | top = qMax(r1->top(), ybot + 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1128 | bot = qMin(r1->bottom(), r2->top() - 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1130 |             if (nonOverlap1Func != 0
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1131 |                 (* never executed:  nonOverlap1Func)(dest, r1, r1BandEnd, top, bot);(*nonOverlap1Func)(dest, r1, r1BandEnd, top, bot);never executed:  (*nonOverlap1Func)(dest, r1, r1BandEnd, top, bot); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1132 | ytop = r2->top(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1133 |         } never executed:   else if (r2->top() < r1->top()end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1134 | top = qMax(r2->top(), ybot + 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1135 | bot = qMin(r2->bottom(), r1->top() - 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1136 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1137 |             if (nonOverlap2Func != 0
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1138 |                 (* never executed:  nonOverlap2Func)(dest, r2, r2BandEnd, top, bot);(*nonOverlap2Func)(dest, r2, r2BandEnd, top, bot);never executed:  (*nonOverlap2Func)(dest, r2, r2BandEnd, top, bot); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1139 | ytop = r1->top(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1140 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1141 | ytop = r1->top(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1142 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1145 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1150 |         if (dest.numRects != curBand
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1151 |             prevBand = miCoalesce(dest, prevBand, curBand); never executed:  prevBand = miCoalesce(dest, prevBand, curBand); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1153 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1154 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1156 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1157 | ybot = qMin(r1->bottom(), r2->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1158 | curBand = dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1159 |         if (ybot >= ytop
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1160 |             (* never executed:  overlapFunc)(dest, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot);(*overlapFunc)(dest, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot);never executed:  (*overlapFunc)(dest, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1162 |         if (dest.numRects != curBand
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1163 |             prevBand = miCoalesce(dest, prevBand, curBand); never executed:  prevBand = miCoalesce(dest, prevBand, curBand); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1164 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1166 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1168 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1169 |         if (r1->bottom() == ybot
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1170 |             r1 = r1BandEnd; never executed:  r1 = r1BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1171 |         if (r2->bottom() == ybot
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1172 |             r2 = r2BandEnd; never executed:  r2 = r2BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1173 |     } never executed:   while (r1 != r1Endend of block
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1178 | curBand = dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1179 |     if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1180 |         if (nonOverlap1Func != 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1181 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1182 | r1BandEnd = r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1183 |                 while (r1BandEnd < r1End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1184 |                     ++ never executed:  r1BandEnd;++r1BandEnd;never executed:  ++r1BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1185 | (*nonOverlap1Func)(dest, r1, r1BandEnd, qMax(r1->top(), ybot + 1), r1->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1186 | r1 = r1BandEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1187 |             } never executed:   while (r1 != r1Endend of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1188 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1189 |     } never executed:   else if ((end of block
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1190 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1191 | r2BandEnd = r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1192 |             while (r2BandEnd < r2End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1193 |                  ++ never executed:  r2BandEnd;++r2BandEnd;never executed:  ++r2BandEnd; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1194 | (*nonOverlap2Func)(dest, r2, r2BandEnd, qMax(r2->top(), ybot + 1), r2->bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1195 | r2 = r2BandEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1196 |         } never executed:   while (r2 != r2Endend of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1197 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1198 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1199 |     if (dest.numRects != curBand
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1200 |         ( never executed:  void)miCoalesce(dest, prevBand, curBand);(void)miCoalesce(dest, prevBand, curBand);never executed:  (void)miCoalesce(dest, prevBand, curBand); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1201 |     if (qMax(4, dest.numRects) < (dest.rects.size() >> 1)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1202 |         dest.rects.resize(dest.numRects); never executed:  dest.rects.resize(dest.numRects); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1203 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1204 | static void miUnionNonO(QRegionPrivate &dest, const QRect *r, const QRect *rEnd, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1205 | int y1, int y2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1206 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1207 | QRect *pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1209 | pNextRect = dest.rects.data() + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1211 | ((!(y1 <= y2)) ? qt_assert("y1 <= y2",__FILE__,2348) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1212 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1213 |     while (r != rEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1214 | ((!(r->left() <= r->right())) ? qt_assert("r->left() <= r->right()",__FILE__,2351) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1215 |         { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1216 | pNextRect->setCoords(r->left(), y1, r->right(), y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1217 | dest.numRects++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1218 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1219 | ++r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1220 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1221 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1222 | static void miUnionO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1223 | const QRect *r2, const QRect *r2End, int y1, int y2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1224 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1225 | QRect *pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1226 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1227 | pNextRect = dest.rects.data() + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1228 | ((!(y1 <= y2)) ? qt_assert("y1 <= y2",__FILE__,2403) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1229 |     while (r1 != r1End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1230 |         if (r1->left() < r2->left()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1231 |             if ((
 
 
 
 
 
 
 
 
 never executed:   }end of blocknever executed:   else { { if ((end of block
 
 never executed:   } pNextRect->setCoords(r1->left(), y1, r1->right(), y2); dest.updateInnerRect(*pNextRect); dest.numRects++; pNextRect++; }end of blocknever executed:   r1++;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1232 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1233 |             if ((
 
 
 
 
 
 
 
 
 never executed:   }end of blocknever executed:   else { { if ((end of block
 
 never executed:   } pNextRect->setCoords(r2->left(), y1, r2->right(), y2); dest.updateInnerRect(*pNextRect); dest.numRects++; pNextRect++; }end of blocknever executed:   r2++;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1234 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1235 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1236 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1237 |     if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1238 | do { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1239 |             if ((
 
 
 
 
 
 
 
 
 never executed:   }end of blocknever executed:   else { { if ((end of block
 
 never executed:   } pNextRect->setCoords(r1->left(), y1, r1->right(), y2); dest.updateInnerRect(*pNextRect); dest.numRects++; pNextRect++; }end of blocknever executed:   r1++;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1240 |         } never executed:   while (r1 != r1Endend of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1241 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1242 |         while (r2 != r2End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1243 |             if ((
 
 
 
 
 
 
 
 
 never executed:   }end of blocknever executed:   else { { if ((end of block
 
 never executed:   } pNextRect->setCoords(r2->left(), y1, r2->right(), y2); dest.updateInnerRect(*pNextRect); dest.numRects++; pNextRect++; }end of blocknever executed:   r2++;end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1244 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1245 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1246 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1247 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1248 | static void UnionRegion(const QRegionPrivate *reg1, const QRegionPrivate *reg2, QRegionPrivate &dest) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1249 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1250 | ((!(!isEmptyHelper(reg1) && !isEmptyHelper(reg2))) ? qt_assert("!isEmptyHelper(reg1) && !isEmptyHelper(reg2)",__FILE__,2425) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1251 | ((!(!reg1->contains(*reg2))) ? qt_assert("!reg1->contains(*reg2)",__FILE__,2426) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1252 | ((!(!reg2->contains(*reg1))) ? qt_assert("!reg2->contains(*reg1)",__FILE__,2427) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1253 | ((!(!EqualRegion(reg1, reg2))) ? qt_assert("!EqualRegion(reg1, reg2)",__FILE__,2428) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1254 | ((!(!reg1->canAppend(reg2))) ? qt_assert("!reg1->canAppend(reg2)",__FILE__,2429) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1255 | ((!(!reg2->canAppend(reg1))) ? qt_assert("!reg2->canAppend(reg1)",__FILE__,2430) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1257 |     if (reg1->innerArea > reg2->innerArea
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1258 | dest.innerArea = reg1->innerArea; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1259 | dest.innerRect = reg1->innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1260 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1261 | dest.innerArea = reg2->innerArea; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1262 | dest.innerRect = reg2->innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1263 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1264 | miRegionOp(dest, reg1, reg2, miUnionO, miUnionNonO, miUnionNonO); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1265 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1266 | dest.extents.setCoords(qMin(reg1->extents.left(), reg2->extents.left()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1267 | qMin(reg1->extents.top(), reg2->extents.top()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1268 | qMax(reg1->extents.right(), reg2->extents.right()), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1269 | qMax(reg1->extents.bottom(), reg2->extents.bottom())); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1270 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1271 | static void miSubtractNonO1(QRegionPrivate &dest, const QRect *r, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1272 | const QRect *rEnd, int y1, int y2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1273 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1274 | QRect *pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1276 | pNextRect = dest.rects.data() + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1278 | ((!(y1<=y2)) ? qt_assert("y1<=y2",__FILE__,2473) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1280 |     while (r != rEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1281 | ((!(r->left() <= r->right())) ? qt_assert("r->left() <= r->right()",__FILE__,2476) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1282 |         { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1283 | pNextRect->setCoords(r->left(), y1, r->right(), y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1284 | ++dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1285 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1286 | ++r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1287 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1288 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1289 | static void miSubtractO(QRegionPrivate &dest, const QRect *r1, const QRect *r1End, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1290 | const QRect *r2, const QRect *r2End, int y1, int y2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1291 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1292 | QRect *pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1293 | int x1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1294 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1295 | x1 = r1->left(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1297 | ((!(y1 <= y2)) ? qt_assert("y1 <= y2",__FILE__,2508) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1298 | pNextRect = dest.rects.data() + dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1300 |     while (r1 != r1End
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1301 |         if (r2->right() < x1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1305 | ++r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1306 |         } never executed:   else if (r2->left() <= x1end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1307 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1310 | x1 = r2->right() + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1311 |             if (x1 > r1->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1312 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1313 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1316 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1317 |                 if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1318 |                     x1 = r1->left(); never executed:  x1 = r1->left(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1319 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1321 | ++r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1322 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1323 |         } else if (r2->left() <= r1->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1326 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1328 | ((!(x1 < r2->left())) ? qt_assert("x1 < r2->left()",__FILE__,2539) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1329 |             { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1330 | pNextRect->setCoords(x1, y1, r2->left() - 1, y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1331 | ++dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1332 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1334 | x1 = r2->right() + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1335 |             if (x1 > r1->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1336 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1337 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1338 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1339 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1340 |                 if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1341 |                     x1 = r1->left(); never executed:  x1 = r1->left(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1342 |             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1343 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1344 | ++r2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1345 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1346 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1350 |             if (r1->right() >= x1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1351 |                 { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1352 | pNextRect->setCoords(x1, y1, r1->right(), y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1353 | ++dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1354 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1355 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1356 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1357 |             if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1358 |                 x1 = r1->left(); never executed:  x1 = r1->left(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1359 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1360 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1361 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1365 |     while (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1366 | ((!(x1 <= r1->right())) ? qt_assert("x1 <= r1->right()",__FILE__,2577) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1367 |         { if ((
 
 never executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1368 | pNextRect->setCoords(x1, y1, r1->right(), y2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1369 | ++dest.numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1370 | ++pNextRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1371 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1372 | ++r1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1373 |         if (r1 != r1End
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1374 |             x1 = r1->left(); never executed:  x1 = r1->left(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1375 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1376 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1377 | static void SubtractRegion(QRegionPrivate *regM, QRegionPrivate *regS, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1378 | QRegionPrivate &dest) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1379 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1380 | ((!(!isEmptyHelper(regM))) ? qt_assert("!isEmptyHelper(regM)",__FILE__,2604) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1381 | ((!(!isEmptyHelper(regS))) ? qt_assert("!isEmptyHelper(regS)",__FILE__,2605) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1382 | ((!(((®M->extents)->right() >= (®S->extents)->left() && (®M->extents)->left() <= (®S->extents)->right() && (®M->extents)->bottom() >= (®S->extents)->top() && (®M->extents)->top() <= (®S->extents)->bottom()))) ? qt_assert("EXTENTCHECK(®M->extents, ®S->extents)",__FILE__,2606) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1383 | ((!(!regS->contains(*regM))) ? qt_assert("!regS->contains(*regM)",__FILE__,2607) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1384 | ((!(!EqualRegion(regM, regS))) ? qt_assert("!EqualRegion(regM, regS)",__FILE__,2608) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1386 | miRegionOp(dest, regM, regS, miSubtractO, miSubtractNonO1, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1387 | miSetExtents(dest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1388 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1389 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1390 | static void XorRegion(QRegionPrivate *sra, QRegionPrivate *srb, QRegionPrivate &dest) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1391 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1392 | ((!(!isEmptyHelper(sra) && !isEmptyHelper(srb))) ? qt_assert("!isEmptyHelper(sra) && !isEmptyHelper(srb)",__FILE__,2624) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1393 | ((!(((&sra->extents)->right() >= (&srb->extents)->left() && (&sra->extents)->left() <= (&srb->extents)->right() && (&sra->extents)->bottom() >= (&srb->extents)->top() && (&sra->extents)->top() <= (&srb->extents)->bottom()))) ? qt_assert("EXTENTCHECK(&sra->extents, &srb->extents)",__FILE__,2625) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1394 | ((!(!EqualRegion(sra, srb))) ? qt_assert("!EqualRegion(sra, srb)",__FILE__,2626) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1396 | QRegionPrivate tra, trb; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1397 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1398 |     if (!srb->contains(*sra)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1399 |         SubtractRegion(sra, srb, tra); never executed:  SubtractRegion(sra, srb, tra); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1400 |     if (!sra->contains(*srb)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1401 |         SubtractRegion(srb, sra, trb); never executed:  SubtractRegion(srb, sra, trb); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1403 | ((!(isEmptyHelper(&trb) || !tra.contains(trb))) ? qt_assert("isEmptyHelper(&trb) || !tra.contains(trb)",__FILE__,2635) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1404 | ((!(isEmptyHelper(&tra) || !trb.contains(tra))) ? qt_assert("isEmptyHelper(&tra) || !trb.contains(tra)",__FILE__,2636) : qt_noop()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1406 |     if (isEmptyHelper(&tra)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1407 | dest = trb; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1408 |     } never executed:   else if (isEmptyHelper(&trb)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1409 | dest = tra; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1410 |     } never executed:   else if (tra.canAppend(&trb)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1411 | dest = tra; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1412 | dest.append(&trb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1413 |     } never executed:   else if (trb.canAppend(&tra)end of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1414 | dest = trb; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1415 | dest.append(&tra); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1416 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1417 | UnionRegion(&tra, &trb, dest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1418 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1419 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1420 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1423 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1424 | static bool EqualRegion(const QRegionPrivate *r1, const QRegionPrivate *r2) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1425 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1426 |     if (r1->numRects != r2->numRects
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1427 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1428 |     } else if (r1->numRects == 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1429 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1430 |     } else if (r1->extents != r2->extents
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1431 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1432 |     } else if (r1->numRects == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1433 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1434 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1435 |         const QRect *rr1 = (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1436 |         const QRect *rr2 = (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1437 |         for (int i = 0; i < r1->numRects
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1438 |             if (*
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1439 |                 return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1440 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1441 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1443 |     return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1444 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1446 | static bool PointInRegion(QRegionPrivate *pRegion, int x, int y) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1447 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1448 | int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1450 |     if (isEmptyHelper(pRegion)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1451 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1452 |     if (!pRegion->extents.contains(x, y)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1453 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1454 |     if (pRegion->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1455 |         return never executed:   pRegion->extents.contains(x, y);return pRegion->extents.contains(x, y);never executed:  return pRegion->extents.contains(x, y); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1456 |     if (pRegion->innerRect.contains(x, y)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1457 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1458 |     for (i = 0; i < pRegion->numRects
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1459 |         if (pRegion->rects[i].contains(x, y)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1460 |             return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1461 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1462 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1463 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1465 | static bool RectInRegion(QRegionPrivate *region, int rx, int ry, uint rwidth, uint rheight) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1466 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1467 | const QRect *pbox; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1468 | const QRect *pboxEnd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1469 | QRect rect(rx, ry, rwidth, rheight); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1470 | QRect *prect = ▭ | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1471 | int partIn, partOut; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1472 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1473 |     if (!region
 
 
 
 
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1474 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1476 | partOut = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1477 | partIn = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1480 |     pbox = (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1481 | pboxEnd = pbox + region->numRects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1482 |     for (; pbox < pboxEnd
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1483 |         if (pbox->bottom() < ry
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1484 |            continue; never executed:  continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1485 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1486 |         if (pbox->top() > ry
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1487 | partOut = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1488 |            if (partIn
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1489 |               break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1490 | ry = pbox->top(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1491 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1493 |         if (pbox->right() < rx
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1494 |            continue; never executed:  continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1495 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1496 |         if (pbox->left() > rx
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1497 | partOut = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1498 |            if (partIn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1499 |               break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1500 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1502 |         if (pbox->left() <= prect->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1503 | partIn = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1504 |             if (partOut
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1505 |                break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1506 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1508 |         if (pbox->right() >= prect->right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1509 | ry = pbox->bottom() + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1510 |            if (ry > prect->bottom()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1511 |               break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1512 | rx = prect->left(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1513 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1517 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1518 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1519 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1520 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1521 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1522 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1523 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1524 |     return never executed:   partInreturn partIn ? ((ry <= prect->bottom()) ? 2 : 1) : 0;
 
 
 never executed:  return partIn ? ((ry <= prect->bottom()) ? 2 : 1) : 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1525 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1526 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1527 | int minor_axis; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1528 | int d; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1529 | int m, m1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1530 | int incr1, incr2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1531 | } BRESINFO; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1532 | typedef struct _EdgeTableEntry { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1533 | int ymax; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1534 | int ClockWise; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1535 | BRESINFO bres; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1536 | struct _EdgeTableEntry *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1537 | struct _EdgeTableEntry *back; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1538 | struct _EdgeTableEntry *nextWETE; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1539 | } EdgeTableEntry; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1540 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1541 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1542 | typedef struct _ScanLineList{ | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1543 | int scanline; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1544 | EdgeTableEntry *edgelist; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1545 | struct _ScanLineList *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1546 | } ScanLineList; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1549 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1550 | int ymax; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1551 | int ymin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1552 | ScanLineList scanlines; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1553 | } EdgeTable; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1554 | typedef struct _ScanLineListBlock { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1555 | ScanLineList SLLs[25]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1556 | struct _ScanLineListBlock *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1557 | } ScanLineListBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1558 | static void InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1559 | ScanLineListBlock **SLLBlock, int *iSLLBlock) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1560 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1561 | EdgeTableEntry *start, *prev; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1562 | ScanLineList *pSLL, *pPrevSLL; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1563 | ScanLineListBlock *tmpSLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1564 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1565 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1567 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1568 | pPrevSLL = &ET->scanlines; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1569 | pSLL = pPrevSLL->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1570 |     while (pSLL
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1571 | pPrevSLL = pSLL; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1572 | pSLL = pSLL->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1573 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1574 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1575 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1577 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1578 |     if ((
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1579 |         if (*
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1580 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1581 | tmpSLLBlock = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1582 | (ScanLineListBlock *)malloc(sizeof(ScanLineListBlock)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1583 |             do {if(!(tmpSLLBlock)
 never executed:  } while (0);qt_check_pointer(__FILE__,3145); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1584 | (*SLLBlock)->next = tmpSLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1585 | tmpSLLBlock->next = (ScanLineListBlock *)__null; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1586 | *SLLBlock = tmpSLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1587 | *iSLLBlock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1588 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1589 | pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1590 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1591 | pSLL->next = pPrevSLL->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1592 | pSLL->edgelist = (EdgeTableEntry *)__null; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1593 | pPrevSLL->next = pSLL; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1594 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1595 | pSLL->scanline = scanline; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1596 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1600 | prev = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1601 | start = pSLL->edgelist; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1602 |     while (start
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1603 | prev = start; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1604 | start = start->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1605 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1606 | ETE->next = start; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1608 |     if (prev
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1609 |         prev->next = ETE; never executed:  prev->next = ETE; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1610 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1611 |         pSLL->edgelist = ETE; never executed:  pSLL->edgelist = ETE; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1612 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1613 | static void CreateETandAET(int count, const QPoint *pts, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1614 | EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1615 | ScanLineListBlock *pSLLBlock) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1616 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1617 | const QPoint *top, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1618 | *bottom, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1619 | *PrevPt, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1620 | *CurrPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1621 | int iSLLBlock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1622 | int dy; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1624 |     if (count < 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1625 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1628 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1630 | AET->next = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1631 | AET->back = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1632 | AET->nextWETE = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1633 | AET->bres.minor_axis = (-2147483647 - 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1635 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1637 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1638 | ET->scanlines.next = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1639 | ET->ymax = (-2147483647 - 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1640 | ET->ymin = 2147483647; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1641 | pSLLBlock->next = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1643 | PrevPt = &pts[count - 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1645 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1648 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1649 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1650 |     while (count--
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1651 | CurrPt = pts++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1653 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1654 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1656 |         if (PrevPt->y() > CurrPt->y()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1657 | bottom = PrevPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1658 | top = CurrPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1659 | pETEs->ClockWise = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1660 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1661 | bottom = CurrPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1662 | top = PrevPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1663 | pETEs->ClockWise = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1664 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1668 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1669 |         if (bottom->y() != top->y()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1670 | pETEs->ymax = bottom->y() - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1673 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1675 | dy = bottom->y() - top->y(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1676 |             { int dx; if ((
 
 
 never executed:   else { pETEs->bres.m = dx / (dy); pETEs->bres.m1 = pETEs->bres.m + 1; pETEs->bres.incr1 = 2 * dx - 2 * (dy) * pETEs->bres.m1; pETEs->bres.incr2 = 2 * dx - 2 * (dy) * pETEs->bres.m; pETEs->bres.d = -2 * pETEs->bres.m * (dy) + 2 * dx; }end of blocknever executed:   } }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1677 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1678 | InsertEdgeInET(ET, pETEs, top->y(), &pSLLBlock, &iSLLBlock); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1680 |             if (PrevPt->y() > ET->ymax
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1681 |                 ET->ymax = PrevPt->y(); never executed:  ET->ymax = PrevPt->y(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1682 |             if (PrevPt->y() < ET->ymin
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1683 |                 ET->ymin = PrevPt->y(); never executed:  ET->ymin = PrevPt->y(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1684 | ++pETEs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1685 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1687 | PrevPt = CurrPt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1688 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1689 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1690 | static void loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1691 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1692 | EdgeTableEntry *pPrevAET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1693 | EdgeTableEntry *tmp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1694 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1695 | pPrevAET = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1696 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1697 |     while (ETEs
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1698 |         while (AET
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1699 | pPrevAET = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1700 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1701 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1702 | tmp = ETEs->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1703 | ETEs->next = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1704 |         if (AET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1705 |             AET->back = ETEs; never executed:  AET->back = ETEs; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1706 | ETEs->back = pPrevAET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1707 | pPrevAET->next = ETEs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1708 | pPrevAET = ETEs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1709 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1710 | ETEs = tmp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1711 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1712 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1713 | static void computeWAET(EdgeTableEntry *AET) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1714 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1715 | EdgeTableEntry *pWETE; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1716 | int inside = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1717 | int isInside = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1719 | AET->nextWETE = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1720 | pWETE = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1721 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1722 |     while (AET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1723 |         if (AET->ClockWise
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1724 |             ++ never executed:  isInside;++isInside;never executed:  ++isInside; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1725 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1726 |             -- never executed:  isInside;--isInside;never executed:  --isInside; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1727 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1728 |         if ((!inside
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1729 | pWETE->nextWETE = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1730 | pWETE = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1731 | inside = !inside; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1732 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1733 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1734 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1735 | pWETE->nextWETE = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1736 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1737 | static int InsertionSort(EdgeTableEntry *AET) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1738 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1739 | EdgeTableEntry *pETEchase; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1740 | EdgeTableEntry *pETEinsert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1741 | EdgeTableEntry *pETEchaseBackTMP; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1742 | int changed = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1743 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1744 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1745 |     while (AET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1746 | pETEinsert = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1747 | pETEchase = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1748 |         while (pETEchase->back->bres.minor_axis > AET->bres.minor_axis
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1749 |             pETEchase = pETEchase->back; never executed:  pETEchase = pETEchase->back; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1751 | AET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1752 |         if (pETEchase != pETEinsert
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1753 | pETEchaseBackTMP = pETEchase->back; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1754 | pETEinsert->back->next = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1755 |             if (AET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1756 |                 AET->back = pETEinsert->back; never executed:  AET->back = pETEinsert->back; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1757 | pETEinsert->next = pETEchase; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1758 | pETEchase->back->next = pETEinsert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1759 | pETEchase->back = pETEinsert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1760 | pETEinsert->back = pETEchaseBackTMP; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1761 | changed = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1762 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1763 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1764 |     return never executed:   changed;return changed;never executed:  return changed; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1765 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1766 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1767 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1769 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1770 | static void FreeStorage(ScanLineListBlock *pSLLBlock) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1771 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1772 | ScanLineListBlock *tmpSLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1774 |     while (pSLLBlock
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1775 | tmpSLLBlock = pSLLBlock->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1776 | free(pSLLBlock); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1777 | pSLLBlock = tmpSLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1778 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1779 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1781 | struct QRegionSpan { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1782 | QRegionSpan() {} | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1783 |     QRegionSpan(int x1_, int x2_) : x1(x1_), x2(x2_) {} never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1784 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1785 | int x1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1786 | int x2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1787 |     int width() const { return never executed:   x2 - x1;return x2 - x1;never executed:   }return x2 - x1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1788 | }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1789 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1790 | template<> class QTypeInfo<QRegionSpan > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QRegionSpan)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QRegionSpan >::value, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QRegionSpan) }; static inline const char *name() { return "QRegionSpan"; } }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1792 | static inline void flushRow(const QRegionSpan *spans, int y, int numSpans, QRegionPrivate *reg, int *lastRow, int *extendTo, bool *needsExtend) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1793 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1794 | QRect *regRects = reg->rects.data() + *lastRow; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1795 |     bool canExtend = reg->rects.size() - *lastRow == numSpans
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1796 |         && !(*
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1797 |         && (*
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1798 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1799 |     for (int i = 0; i < numSpans
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1800 |         if (regRects[i].x() != spans[i].x1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1801 |             canExtend = false; never executed:  canExtend = false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1802 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1803 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1804 |     if (canExtend
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1805 | *extendTo = y; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1806 | *needsExtend = true; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1807 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1808 |         if (*
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1809 |             for (int i = 0; i < reg->rects.size() - *lastRow
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1810 |                 regRects[i].setBottom(*extendTo); never executed:  regRects[i].setBottom(*extendTo); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1811 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1812 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1813 | *lastRow = reg->rects.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1814 | reg->rects.reserve(*lastRow + numSpans); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1815 |         for (int i = 0; i < numSpans
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1816 |             reg->rects << QRect(spans[i].x1, y, spans[i].width(), 1); never executed:  reg->rects << QRect(spans[i].x1, y, spans[i].width(), 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1817 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1818 |         if (spans[0].x1 < reg->extents.left()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1819 |             reg->extents.setLeft(spans[0].x1); never executed:  reg->extents.setLeft(spans[0].x1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1821 |         if (spans[numSpans-1].x2 - 1 > reg->extents.right()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1822 |             reg->extents.setRight(spans[numSpans-1].x2 - 1); never executed:  reg->extents.setRight(spans[numSpans-1].x2 - 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1823 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1824 | *needsExtend = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1825 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1826 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1827 | static void PtsToRegion(int numFullPtBlocks, int iCurPtBlock, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1828 | POINTBLOCK *FirstPtBlock, QRegionPrivate *reg) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1829 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1830 | int lastRow = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1831 | int extendTo = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1832 | bool needsExtend = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1833 | QVarLengthArray<QRegionSpan> row; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1834 | int rowSize = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1835 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1836 | reg->extents.setLeft(2147483647); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1837 | reg->extents.setRight((-2147483647 - 1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1838 | reg->innerArea = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1839 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1840 | POINTBLOCK *CurPtBlock = FirstPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1841 |     for (; numFullPtBlocks >= 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1843 | int i = 200 >> 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1844 |         if (!numFullPtBlocks
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1845 |             i = iCurPtBlock >> 1; never executed:  i = iCurPtBlock >> 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1846 |         if(i
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1847 | row.resize(qMax(row.size(), rowSize + i)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1848 |             for (QPoint *pts = CurPtBlock->pts; i--
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1849 | const int width = pts[1].x() - pts[0].x(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1850 |                 if (width
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1851 |                     if (rowSize
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1852 |                         row[rowSize-1].x2 = pts[1].x(); never executed:  row[rowSize-1].x2 = pts[1].x(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1853 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1854 |                         row[rowSize++] = QRegionSpan(pts[0].x(), pts[1].x()); never executed:  row[rowSize++] = QRegionSpan(pts[0].x(), pts[1].x()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1855 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1856 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1857 |                 if (rowSize
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1858 |                     QPoint *next = i
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1859 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1860 |                     if (!next
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1861 | flushRow(row.data(), pts[0].y(), rowSize, reg, &lastRow, &extendTo, &needsExtend); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1862 | rowSize = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1863 |                     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1864 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1865 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1866 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1867 | CurPtBlock = CurPtBlock->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1868 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1869 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1870 |     if (needsExtend
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1871 |         for (int i = lastRow; i < reg->rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1872 |             reg->rects[i].setBottom(extendTo); never executed:  reg->rects[i].setBottom(extendTo); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1873 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1874 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1875 | reg->numRects = reg->rects.size(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1876 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1877 |     if (reg->numRects
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1878 | reg->extents.setTop(reg->rects[0].top()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1879 | reg->extents.setBottom(reg->rects[lastRow].bottom()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1880 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1881 |         for (int i = 0; i < reg->rects.size()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1882 |             reg->updateInnerRect(reg->rects[i]); never executed:  reg->updateInnerRect(reg->rects[i]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1883 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1884 | reg->extents.setCoords(0, 0, 0, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1885 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1886 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1887 | static QRegionPrivate *PolygonRegion(const QPoint *Pts, int Count, int rule) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1888 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1889 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1890 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1891 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1892 | QRegionPrivate *region; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1893 | EdgeTableEntry *pAET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1894 | int y; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1895 | int iPts = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1896 | EdgeTableEntry *pWETE; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1897 | ScanLineList *pSLL; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1898 | QPoint *pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1899 | EdgeTableEntry *pPrevAET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1900 | EdgeTable ET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1901 | EdgeTableEntry *AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1902 | EdgeTableEntry *pETEs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1903 | ScanLineListBlock SLLBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1904 | int fixWAET = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1905 | POINTBLOCK FirstPtBlock, *curPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1906 | FirstPtBlock.pts = reinterpret_cast<QPoint *>(FirstPtBlock.data); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1907 | POINTBLOCK *tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1908 | int numFullPtBlocks = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1909 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1910 | region = new QRegionPrivate; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1911 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1912 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1913 |     if (((
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1914 |          ((
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1915 |          && (((
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1916 |                && (
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1917 |                && (
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1918 |                && (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1919 | int x = qMin(Pts[0].x(), Pts[2].x()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1920 | region->extents.setLeft(x); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1921 | int y = qMin(Pts[0].y(), Pts[2].y()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1922 | region->extents.setTop(y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1923 | region->extents.setWidth(qMax(Pts[0].x(), Pts[2].x()) - x); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1924 | region->extents.setHeight(qMax(Pts[0].y(), Pts[2].y()) - y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1925 |         if ((
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1926 |             (
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1927 | region->numRects = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1928 | region->innerRect = region->extents; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1929 | region->innerArea = region->innerRect.width() * region->innerRect.height(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1930 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1931 |         return never executed:   region;return region;never executed:  return region; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1932 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1934 |     if (!(pETEs = static_cast<EdgeTableEntry *>(malloc(sizeof(EdgeTableEntry) * Count)))
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1935 | delete region; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1936 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1937 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1938 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1939 | region->vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1940 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1941 | AET = new EdgeTableEntry; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1942 | pts = FirstPtBlock.pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1943 | CreateETandAET(Count, Pts, &ET, AET, pETEs, &SLLBlock); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1944 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1945 | pSLL = ET.scanlines.next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1946 | curPtBlock = &FirstPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1947 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1948 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1949 |     if (ET.ymax - ET.ymin > 100000
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1950 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1951 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1952 | QMessageLogger(__FILE__, 3600, __PRETTY_FUNCTION__).warning("QRegion: creating region from big polygon failed...!"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1953 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1954 | delete AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1955 | delete region; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1956 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1957 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1958 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1959 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1960 | if (true) { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1961 |         if (rule == 0
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1963 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1964 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1965 |             for (y = ET.ymin; y < ET.ymax
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1966 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1967 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1968 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1969 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1970 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1971 |                 if (pSLL
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1972 | loadAET(AET, pSLL->edgelist); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1973 | pSLL = pSLL->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1974 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1975 | pPrevAET = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1976 | pAET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1978 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1979 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1980 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1981 |                 while (pAET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1982 | pts->setX(pAET->bres.minor_axis); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1983 | pts->setY(y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1984 | ++pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1985 | ++iPts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1986 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1987 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1988 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1989 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1990 |                     if (iPts == 200
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1991 | tmpPtBlock = (POINTBLOCK *)malloc(sizeof(POINTBLOCK)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1992 |                         do {if(!(tmpPtBlock)
 never executed:  } while (0);qt_check_pointer(__FILE__,3640); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1993 | tmpPtBlock->pts = reinterpret_cast<QPoint *>(tmpPtBlock->data); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1994 | curPtBlock->next = tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1995 | curPtBlock = tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1996 | pts = curPtBlock->pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1997 | ++numFullPtBlocks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1998 | iPts = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1999 |                     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2000 |                     { if (pAET->ymax == y
 
 never executed:   }pAET->back = pPrevAET;never executed:   else { { if (pAET->bres.m1 > 0end of block
 
 never executed:   else { pAET->bres.minor_axis += pAET->bres.m; pAET->bres.d += pAET->bres.incr2; }end of blocknever executed:   } else { if (pAET->bres.d >= 0end of block
 never executed:   else { pAET->bres.minor_axis += pAET->bres.m; pAET->bres.d += pAET->bres.incr2; }end of blocknever executed:   } } pPrevAET = pAET; pAET = pAET->next; }end of blocknever executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2001 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2002 | InsertionSort(AET); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2003 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2004 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2008 |             for (y = ET.ymin; y < ET.ymax
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2009 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2013 |                 if (pSLL
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2014 | loadAET(AET, pSLL->edgelist); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2015 | computeWAET(AET); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2016 | pSLL = pSLL->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2017 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2018 | pPrevAET = AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2019 | pAET = AET->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2020 | pWETE = pAET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2021 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2022 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2025 |                 while (pAET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2026 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2028 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2029 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2030 |                     if (pWETE == pAET
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2031 | pts->setX(pAET->bres.minor_axis); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2032 | pts->setY(y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2033 | ++pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2034 | ++iPts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2035 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2036 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2037 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2038 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2039 |                         if (iPts == 200
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2040 | tmpPtBlock = static_cast<POINTBLOCK *>(malloc(sizeof(POINTBLOCK))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2041 | tmpPtBlock->pts = reinterpret_cast<QPoint *>(tmpPtBlock->data); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2042 | curPtBlock->next = tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2043 | curPtBlock = tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2044 | pts = curPtBlock->pts; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2045 | ++numFullPtBlocks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2046 | iPts = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2047 |                         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2048 | pWETE = pWETE->nextWETE; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2049 |                     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2050 |                     { if (pAET->ymax == y
 
 never executed:   }pAET->back = pPrevAET;never executed:   else { { if (pAET->bres.m1 > 0end of block
 
 never executed:   else { pAET->bres.minor_axis += pAET->bres.m; pAET->bres.d += pAET->bres.incr2; }end of blocknever executed:   } else { if (pAET->bres.d >= 0end of block
 never executed:   else { pAET->bres.minor_axis += pAET->bres.m; pAET->bres.d += pAET->bres.incr2; }end of blocknever executed:   } } pPrevAET = pAET; pAET = pAET->next; }end of blocknever executed:   }end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2051 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2052 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2053 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2054 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2055 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2056 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2057 |                 if (InsertionSort(AET)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2058 | computeWAET(AET); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2059 | fixWAET = false; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2060 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2061 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2062 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2063 |     } else { dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2064 |         FreeStorage(SLLBlock.next); dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2065 |         PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2066 |         for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2067 |             tmpPtBlock = curPtBlock->next; dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2068 |             free(curPtBlock); dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2069 |             curPtBlock = tmpPtBlock; dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2070 |         } dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2071 |         free(pETEs); dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2072 |         return 0; dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2073 |     } dead code:  { FreeStorage(SLLBlock.next); PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; free(curPtBlock); curPtBlock = tmpPtBlock; } free(pETEs); return 0; } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2074 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2075 | FreeStorage(SLLBlock.next); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2076 | PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2077 |     for (curPtBlock = FirstPtBlock.next; --
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2078 | tmpPtBlock = curPtBlock->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2079 | free(curPtBlock); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2080 | curPtBlock = tmpPtBlock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2081 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2082 | delete AET; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2083 | free(pETEs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2084 |     return never executed:   region;return region;never executed:  return region; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2085 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2086 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2087 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2088 | QRegionPrivate *qt_bitmapToRegion(const QBitmap& bitmap) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2089 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2090 | const QImage image = bitmap.toImage(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2091 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2092 | QRegionPrivate *region = new QRegionPrivate; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2093 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2094 | QRect xr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2095 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2096 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2097 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2098 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2099 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2100 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2102 | const uchar zero = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2103 | bool little = image.format() == QImage::Format_MonoLSB; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2104 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2105 | int x, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2106 | y; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2107 |     for (y = 0; y < image.height()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2108 | const uchar *line = image.constScanLine(y); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2109 | int w = image.width(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2110 | uchar all = zero; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2111 | int prev1 = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2112 |         for (x = 0; x < w
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2113 | uchar byte = line[x / 8]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2114 |             if (x > w - 8
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2115 |                 if (little
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2116 |                     for (int b = 8; b > 0
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2117 |                         if (!(byte & 0x01) == !all
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2118 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2119 |                         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2121 |                             if (all!=zero
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2122 | { xr.setCoords(prev1, y, x-1, y); UnionRectWithRegion(&xr, region, *region); } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2123 | all = zero; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2124 |                             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2125 | prev1 = x; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2126 | all = ~zero; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2127 |                             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2128 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2129 | byte >>= 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2130 | ++x; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2131 |                     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2132 |                 } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2133 |                     for (int b = 8; b > 0
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2134 |                         if (!(byte & 0x80) == !all
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2135 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2136 |                         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2138 |                             if (all != zero
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2139 | { xr.setCoords(prev1, y, x-1, y); UnionRectWithRegion(&xr, region, *region); } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2140 | all = zero; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2141 |                             } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2142 | prev1 = x; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2143 | all = ~zero; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2144 |                             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2145 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2146 | byte <<= 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2147 | ++x; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2148 |                     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2149 |                 } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2150 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2151 | x += 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2152 |             } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2153 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2154 |         if (all != zero
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2155 | { xr.setCoords(prev1, y, x-1, y); UnionRectWithRegion(&xr, region, *region); } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2156 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2157 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2158 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2159 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2160 |     return never executed:   region;return region;never executed:  return region; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2161 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2163 | QRegion::QRegion() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2164 | : d(const_cast<QRegionData*>(&shared_empty)) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2165 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2166 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2167 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2168 | QRegion::QRegion(const QRect &r, RegionType t) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2169 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2170 |     if (r.isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2171 | d = const_cast<QRegionData*>(&shared_empty); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2172 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2173 | d = new QRegionData; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2174 | d->ref.initializeOwned(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2175 |         if (t == Rectangle
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2176 | d->qt_rgn = new QRegionPrivate(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2177 |         } never executed:   else if (t == Ellipseend of block
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2178 | QPainterPath path; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2179 | path.addEllipse(r.x(), r.y(), r.width(), r.height()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2180 | QPolygon a = path.toSubpathPolygons().at(0).toPolygon(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2181 | d->qt_rgn = PolygonRegion(a.constData(), a.size(), 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2182 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2183 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2184 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2185 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2186 | QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2187 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2188 |     if (a.count() > 2
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2189 | QRegionPrivate *qt_rgn = PolygonRegion(a.constData(), a.size(), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2190 | fillRule == Qt::WindingFill ? 1 : 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2191 |         if (qt_rgn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2192 | d = new QRegionData; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2193 | d->ref.initializeOwned(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2194 | d->qt_rgn = qt_rgn; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2195 |         } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2196 | d = const_cast<QRegionData*>(&shared_empty); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2197 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2198 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2199 | d = const_cast<QRegionData*>(&shared_empty); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2200 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2201 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2203 | QRegion::QRegion(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2204 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2205 | d = r.d; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2206 | d->ref.ref(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2207 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2210 | QRegion::QRegion(const QBitmap &bm) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2211 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2212 |     if (bm.isNull()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2213 | d = const_cast<QRegionData*>(&shared_empty); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2214 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2215 | d = new QRegionData; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2216 | d->ref.initializeOwned(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2217 | d->qt_rgn = qt_bitmapToRegion(bm); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2218 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2219 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2220 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2221 | void QRegion::cleanUp(QRegion::QRegionData *x) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2222 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2223 | delete x->qt_rgn; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2224 | delete x; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2225 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2226 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2227 | QRegion::~QRegion() | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2228 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2229 |     if (!d->ref.deref()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2230 |         cleanUp(d); never executed:  cleanUp(d); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2231 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2232 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2234 | QRegion &QRegion::operator=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2235 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2236 | r.d->ref.ref(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2237 |     if (!d->ref.deref()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2238 |         cleanUp(d); never executed:  cleanUp(d); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2239 | d = r.d; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2240 |     return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2241 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2242 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2243 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2247 | QRegion QRegion::copy() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2248 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2249 | QRegion r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2250 | QScopedPointer<QRegionData> x(new QRegionData); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2251 | x->ref.initializeOwned(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2252 |     if (d->qt_rgn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2253 |         x->qt_rgn = new QRegionPrivate(*d->qt_rgn); never executed:  x->qt_rgn = new QRegionPrivate(*d->qt_rgn); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2254 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2255 |         x->qt_rgn = new QRegionPrivate; never executed:  x->qt_rgn = new QRegionPrivate; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2256 |     if (!r.d->ref.deref()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2257 |         cleanUp(r.d); never executed:  cleanUp(r.d); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2258 | r.d = x.take(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2259 |     return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2260 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2261 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2262 | bool QRegion::isEmpty() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2263 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2264 |     return never executed:   d == &shared_emptyreturn d == &shared_empty || d->qt_rgn->numRects == 0;
 
 never executed:  return d == &shared_empty || d->qt_rgn->numRects == 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2265 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2267 | bool QRegion::isNull() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2268 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2269 |     return never executed:   d == &shared_emptyreturn d == &shared_empty || d->qt_rgn->numRects == 0;
 
 never executed:  return d == &shared_empty || d->qt_rgn->numRects == 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2270 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2272 | bool QRegion::contains(const QPoint &p) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2273 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2274 |     return never executed:   PointInRegion(d->qt_rgn, p.x(), p.y());return PointInRegion(d->qt_rgn, p.x(), p.y());never executed:  return PointInRegion(d->qt_rgn, p.x(), p.y()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2275 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2276 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2277 | bool QRegion::contains(const QRect &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2278 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2279 |     return never executed:   RectInRegion(d->qt_rgn, r.left(), r.top(), r.width(), r.height()) != 0;return RectInRegion(d->qt_rgn, r.left(), r.top(), r.width(), r.height()) != 0;never executed:  return RectInRegion(d->qt_rgn, r.left(), r.top(), r.width(), r.height()) != 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2280 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2283 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2284 | void QRegion::translate(int dx, int dy) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2285 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2286 |     if ((dx == 0
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2287 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2289 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2290 | OffsetRegion(*d->qt_rgn, dx, dy); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2291 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2293 | QRegion QRegion::united(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2294 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2295 |     if (isEmptyHelper(d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2296 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2297 |     if (isEmptyHelper(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2298 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2299 |     if (d == r.d
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2300 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2302 |     if (d->qt_rgn->contains(*r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2303 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2304 |     } else if (r.d->qt_rgn->contains(*d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2305 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2306 |     } else if (d->qt_rgn->canAppend(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2307 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2308 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2309 | result.d->qt_rgn->append(r.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2310 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2311 |     } else if (d->qt_rgn->canPrepend(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2312 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2313 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2314 | result.d->qt_rgn->prepend(r.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2315 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2316 |     } else if (EqualRegion(d->qt_rgn, r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2317 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2318 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2319 | QRegion result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2320 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2321 | UnionRegion(d->qt_rgn, r.d->qt_rgn, *result.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2322 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2323 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2324 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2326 | QRegion& QRegion::operator+=(const QRegion &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2327 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2328 |     if (isEmptyHelper(d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2329 |         return never executed:   *this = r;return *this = r;never executed:  return *this = r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2330 |     if (isEmptyHelper(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2331 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2332 |     if (d == r.d
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2333 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2335 |     if (d->qt_rgn->contains(*r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2336 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2337 |     } else if (r.d->qt_rgn->contains(*d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2338 |         return never executed:   *this = r;return *this = r;never executed:  return *this = r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2339 |     } else if (d->qt_rgn->canAppend(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2340 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2341 | d->qt_rgn->append(r.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2342 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2343 |     } else if (d->qt_rgn->canPrepend(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2344 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2345 | d->qt_rgn->prepend(r.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2346 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2347 |     } else if (EqualRegion(d->qt_rgn, r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2348 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2349 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2350 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2351 | UnionRegion(d->qt_rgn, r.d->qt_rgn, *d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2352 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2353 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2354 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2355 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2356 | QRegion QRegion::united(const QRect &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2357 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2358 |     if (isEmptyHelper(d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2359 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2360 |     if (r.isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2361 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2363 |     if (d->qt_rgn->contains(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2364 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2365 |     } else if (d->qt_rgn->within(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2366 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2367 |     } else if (d->qt_rgn->numRects == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2368 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2369 |     } else if (d->qt_rgn->canAppend(&r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2370 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2371 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2372 | result.d->qt_rgn->append(&r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2373 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2374 |     } else if (d->qt_rgn->canPrepend(&r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2375 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2376 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2377 | result.d->qt_rgn->prepend(&r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2378 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2379 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2380 | QRegion result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2381 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2382 | QRegionPrivate rp(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2383 | UnionRegion(d->qt_rgn, &rp, *result.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2384 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2385 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2386 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2387 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2388 | QRegion& QRegion::operator+=(const QRect &r) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2389 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2390 |     if (isEmptyHelper(d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2391 |         return never executed:   *this = r;return *this = r;never executed:  return *this = r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2392 |     if (r.isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2393 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2395 |     if (d->qt_rgn->contains(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2396 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2397 |     } else if (d->qt_rgn->within(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2398 |         return never executed:   *this = r;return *this = r;never executed:  return *this = r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2399 |     } else if (d->qt_rgn->canAppend(&r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2400 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2401 | d->qt_rgn->append(&r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2402 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2403 |     } else if (d->qt_rgn->canPrepend(&r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2404 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2405 | d->qt_rgn->prepend(&r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2406 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2407 |     } else if (d->qt_rgn->numRects == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2408 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2409 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2410 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2411 | QRegionPrivate p(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2412 | UnionRegion(d->qt_rgn, &p, *d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2413 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2414 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2415 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2416 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2417 | QRegion QRegion::intersected(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2418 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2419 |     if (isEmptyHelper(d->qt_rgn)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2420 |         || !((
 
 
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2421 |         return never executed:   QRegion();return QRegion();never executed:  return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2423 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2424 |     if (r.d->qt_rgn->contains(*d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2425 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2428 |     if (d->qt_rgn->contains(*r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2429 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2431 |     if (r.d->qt_rgn->numRects == 1
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2432 | const QRect rect = qt_rect_intersect_normalized(r.d->qt_rgn->extents, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2433 | d->qt_rgn->extents); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2434 |         return never executed:   QRegion(rect);return QRegion(rect);never executed:  return QRegion(rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2435 |     } else if (r.d->qt_rgn->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2436 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2437 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2438 | result.d->qt_rgn->intersect(r.d->qt_rgn->extents); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2439 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2440 |     } else if (d->qt_rgn->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2441 | QRegion result(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2442 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2443 | result.d->qt_rgn->intersect(d->qt_rgn->extents); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2444 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2445 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2446 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2447 | QRegion result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2448 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2449 | miRegionOp(*result.d->qt_rgn, d->qt_rgn, r.d->qt_rgn, miIntersectO, 0, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2450 | miSetExtents(*result.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2451 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2452 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2453 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2454 | QRegion QRegion::intersected(const QRect &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2455 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2456 |     if (isEmptyHelper(d->qt_rgn)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2457 |         || !((
 
 
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2458 |         return never executed:   QRegion();return QRegion();never executed:  return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2459 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2460 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2461 |     if (d->qt_rgn->within(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2462 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2465 |     if (d->qt_rgn->contains(r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2466 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2467 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2468 |     if (d->qt_rgn->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2469 | const QRect rect = qt_rect_intersect_normalized(d->qt_rgn->extents, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2470 | r.normalized()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2471 |         return never executed:   QRegion(rect);return QRegion(rect);never executed:  return QRegion(rect); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2472 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2473 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2474 | QRegion result(*this); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2475 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2476 | result.d->qt_rgn->intersect(r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2477 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2478 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2480 | QRegion QRegion::subtracted(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2481 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2482 |     if (isEmptyHelper(d->qt_rgn)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2483 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2484 |     if (r.d->qt_rgn->contains(*d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2485 |         return never executed:   QRegion();return QRegion();never executed:  return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2486 |     if (!((
 
 
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2487 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2488 |     if (d == r.d
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2489 |         return never executed:   QRegion();return QRegion();never executed:  return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2490 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2492 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2493 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2494 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2495 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2496 | QRegion result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2497 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2498 | SubtractRegion(d->qt_rgn, r.d->qt_rgn, *result.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2499 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2500 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2502 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2503 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2504 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2505 | QRegion QRegion::xored(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2506 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2507 |     if (isEmptyHelper(d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2508 |         return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2509 |     } else if (isEmptyHelper(r.d->qt_rgn)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2510 |         return never executed:   *this;return *this;never executed:  return *this; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2511 |     } else if (!((
 
 
 
 
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2512 |         return never executed:   (*this + r);return (*this + r);never executed:  return (*this + r); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2513 |     } else if (d == r.d
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2514 |         return never executed:   QRegion();return QRegion();never executed:  return QRegion(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2515 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2516 | QRegion result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2517 | result.detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2518 | XorRegion(d->qt_rgn, r.d->qt_rgn, *result.d->qt_rgn); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2519 |         return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2520 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2521 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2523 | QRect QRegion::boundingRect() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2524 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2525 |     if (isEmpty()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2526 |         return never executed:   QRect();return QRect();never executed:  return QRect(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2527 |     return never executed:   d->qt_rgn->extents;return d->qt_rgn->extents;never executed:  return d->qt_rgn->extents; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2528 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2534 | __attribute__((visibility("default"))) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2535 | bool qt_region_strictContains(const QRegion ®ion, const QRect &rect) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2536 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2537 |     if (isEmptyHelper(region.d->qt_rgn)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2538 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2539 | const QRect r1 = region.d->qt_rgn->innerRect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2540 |     return never executed:   (rect.left() >= r1.left()return (rect.left() >= r1.left() && rect.right() <= r1.right() && rect.top() >= r1.top() && rect.bottom() <= r1.bottom());
 
 never executed:  return (rect.left() >= r1.left() && rect.right() <= r1.right() && rect.top() >= r1.top() && rect.bottom() <= r1.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2541 |             && rect.top() >= r1.top()
 
 never executed:  return (rect.left() >= r1.left() && rect.right() <= r1.right() && rect.top() >= r1.top() && rect.bottom() <= r1.bottom()); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2542 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2544 | QVector<QRect> QRegion::rects() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2545 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2546 |     if (d->qt_rgn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2547 | d->qt_rgn->vectorize(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2548 | d->qt_rgn->rects.reserve(d->qt_rgn->numRects); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2549 | d->qt_rgn->rects.resize(d->qt_rgn->numRects); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2550 |         return never executed:   d->qt_rgn->rects;return d->qt_rgn->rects;never executed:  return d->qt_rgn->rects; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2551 | } else { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2552 |         return never executed:   QVector<QRect>();return QVector<QRect>();never executed:  return QVector<QRect>(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2553 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2554 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2555 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2556 | void QRegion::setRects(const QRect *rects, int num) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2557 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2558 | *this = QRegion(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2559 |     if (!rects
 
 
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2560 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2561 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2562 | detach(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2563 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2564 | d->qt_rgn->numRects = num; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2565 |     if (num == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2566 | d->qt_rgn->extents = *rects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2567 | d->qt_rgn->innerRect = *rects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2568 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2569 | d->qt_rgn->rects.resize(num); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2570 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2571 | int left = 2147483647, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2572 | right = (-2147483647 - 1), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2573 | top = 2147483647, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2574 | bottom = (-2147483647 - 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2575 |         for (int i = 0; i < num
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2576 | const QRect &rect = rects[i]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2577 | d->qt_rgn->rects[i] = rect; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2578 | left = qMin(rect.left(), left); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2579 | right = qMax(rect.right(), right); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2580 | top = qMin(rect.top(), top); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2581 | bottom = qMax(rect.bottom(), bottom); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2582 | d->qt_rgn->updateInnerRect(rect); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2583 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2584 | d->qt_rgn->extents = QRect(QPoint(left, top), QPoint(right, bottom)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2585 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2586 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2588 | int QRegion::rectCount() const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2589 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2590 |     return never executed:   (d->qt_rgnreturn (d->qt_rgn ? d->qt_rgn->numRects : 0);
 never executed:  return (d->qt_rgn ? d->qt_rgn->numRects : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2591 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2592 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2593 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2594 | bool QRegion::operator==(const QRegion &r) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2595 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2596 |     if (!d->qt_rgn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2597 |         return never executed:   r.isEmpty();return r.isEmpty();never executed:  return r.isEmpty(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2598 |     if (!r.d->qt_rgn
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2599 |         return never executed:   isEmpty();return isEmpty();never executed:  return isEmpty(); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2601 |     if (d == r.d
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2602 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2603 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2604 |         return never executed:   EqualRegion(d->qt_rgn, r.d->qt_rgn);return EqualRegion(d->qt_rgn, r.d->qt_rgn);never executed:  return EqualRegion(d->qt_rgn, r.d->qt_rgn); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2605 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2606 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2607 | bool QRegion::intersects(const QRect &rect) const | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2608 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2609 |     if (isEmptyHelper(d->qt_rgn)
 
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2610 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2611 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2612 | const QRect r = rect.normalized(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2613 |     if (!rect_intersects(d->qt_rgn->extents, r)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2614 |         return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2615 |     if (d->qt_rgn->numRects == 1
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2616 |         return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2617 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2618 | const QVector<QRect> myRects = rects(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2619 |     for (QVector<QRect>::const_iterator it = myRects.constBegin(); it < myRects.constEnd()
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2620 |         if (rect_intersects(r, *it)
  | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2621 |             return never executed:   true;return true;never executed:  return true; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2622 |     return never executed:   false;return false;never executed:  return false; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2623 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2625 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |