| 11 | |
| 12 | namespace SOUI{ |
| 13 | void SkIRect::join(int32_t left, int32_t top, int32_t right, int32_t bottom) { |
| 14 | // do nothing if the params are empty |
| 15 | if (left >= right || top >= bottom) { |
| 16 | return; |
| 17 | } |
| 18 | |
| 19 | // if we are empty, just assign |
| 20 | if (fLeft >= fRight || fTop >= fBottom) { |
| 21 | this->set(left, top, right, bottom); |
| 22 | } else { |
| 23 | if (left < fLeft) fLeft = left; |
| 24 | if (top < fTop) fTop = top; |
| 25 | if (right > fRight) fRight = right; |
| 26 | if (bottom > fBottom) fBottom = bottom; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | void SkIRect::sort() { |
| 31 | if (fLeft > fRight) { |