コード例 #1
0
ファイル: FloatRect.cpp プロジェクト: HansMuller/engine
void FloatRect::unite(const FloatRect& other) {
  // Handle empty special cases first.
  if (other.isEmpty())
    return;
  if (isEmpty()) {
    *this = other;
    return;
  }

  uniteEvenIfEmpty(other);
}
コード例 #2
0
ファイル: IntRect.cpp プロジェクト: mirror/chromium
void IntRect::uniteIfNonZero(const IntRect& other) {
  // Handle empty special cases first.
  if (!other.width() && !other.height())
    return;
  if (!width() && !height()) {
    *this = other;
    return;
  }

  uniteEvenIfEmpty(other);
}