Lines Matching full:rect
31 #include <utils/rect.h>
39 bool IsValid(const LayerRect &rect) {
40 return ((rect.bottom > rect.top) && (rect.right > rect.left));
55 void Normalize(const uint32_t &align_x, const uint32_t &align_y, LayerRect *rect) {
56 rect->left = ROUND_UP_ALIGN_UP(rect->left, align_x);
57 rect->right = ROUND_UP_ALIGN_DOWN(rect->right, align_x);
58 rect->top = ROUND_UP_ALIGN_UP(rect->top, align_y);
59 rect->bottom = ROUND_UP_ALIGN_DOWN(rect->bottom, align_y);
81 LayerRect Reposition(const LayerRect &rect, const int &x_offset, const int &y_offset) {
84 if (!IsValid(rect)) {
88 res.left = rect.left + FLOAT(x_offset);
89 res.top = rect.top + FLOAT(y_offset);
90 res.right = rect.right + FLOAT(x_offset);
91 res.bottom = rect.bottom + FLOAT(y_offset);
96 // Not a geometrical rect deduction. Deducts rect2 from rect1 only if it results a single rect