Home | History | Annotate | Download | only in ui

Lines Matching refs:Rect

25 #include <ui/Rect.h>
44 op_nand = region_operator<Rect>::op_nand,
45 op_and = region_operator<Rect>::op_and,
46 op_or = region_operator<Rect>::op_or,
47 op_xor = region_operator<Rect>::op_xor
58 mStorage.add(Rect(0,0));
69 Region::Region(const Rect& rhs) {
91 static void reverseRectsResolvingJunctions(const Rect* begin, const Rect* end,
92 Vector<Rect>& dst, int spanDirection) {
95 const Rect* current = end - 1;
129 const Rect* prev = &dst[prevIndex];
135 dst.add(Rect(prev->right, top, right, bottom));
140 dst.add(Rect(prev->left, top, right, bottom));
154 dst.add(Rect(left, top, prev->left, bottom));
159 dst.add(Rect(left, top, prev->right, bottom));
171 dst.add(Rect(left, top, right, bottom));
189 Vector<Rect> reversed;
217 const Rect bounds(getBounds());
227 mStorage.add(Rect(0,0));
230 void Region::set(const Rect& r)
239 mStorage.add(Rect(w,h));
250 Rect rect(l,t,r,b);
252 mStorage.insertAt(rect, where, 1);
257 Region& Region::orSelf(const Rect& r) {
260 Region& Region::xorSelf(const Rect& r) {
263 Region& Region::andSelf(const Rect& r) {
266 Region& Region::subtractSelf(const Rect& r) {
269 Region& Region::operationSelf(const Rect& r, int op) {
302 const Region Region::merge(const Rect& rhs) const {
305 const Region Region::mergeExclusive(const Rect& rhs) const {
308 const Region Region::intersect(const Rect& rhs) const {
311 const Region Region::subtract(const Rect& rhs) const {
314 const Region Region::operation(const Rect& rhs, int op) const {
390 class Region::rasterizer : public region_operator<Rect>::region_rasterizer
392 Rect bounds;
393 Vector<Rect>& storage;
394 Rect* head;
395 Rect* tail;
396 Vector<Rect> span;
397 Rect* cur;
421 virtual void operator()(const Rect& rect) {
423 // rect.left, rect.top, rect.right, rect.bottom);
425 if (cur->top != rect.top) {
427 } else if (cur->right == rect.left) {
428 cur->right = rect.right;
432 span.add(rect);
443 Rect const* p = span.editArray();
444 Rect const* q = head;
458 Rect* r = head;
480 Rect b(*prev);
483 ALOGE_IF(!silent, "%s: region contains an invalid Rect", name);
486 if (cur->right > region_operator<Rect>::max_value) {
487 ALOGE_IF(!silent, "%s: rect->right > max_value", name);
490 if (cur->bottom > region_operator<Rect>::max_value) {
491 ALOGE_IF(!silent, "%s: rect->right > max_value", name);
553 Rect const * const lhs_rects = lhs.getArray(&lhs_count);
556 Rect const * const rhs_rects = rhs.getArray(&rhs_count);
558 region_operator<Rect>::region lhs_region(lhs_rects, lhs_count);
559 region_operator<Rect>::region rhs_region(rhs_rects, rhs_count, dx, dy);
560 region_operator<Rect> operation(op, lhs_region, rhs_region);
613 head->left != it.rect().fLeft ||
614 head->top != it.rect().fTop ||
615 head->right != it.rect().fRight ||
616 head->bottom != it.rect().fBottom
642 it.rect().fLeft,
643 it.rect().fTop,
644 it.rect().fRight,
645 it.rect().fBottom);
654 const Rect& rhs, int dx, int dy)
657 ALOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
666 Rect const * const lhs_rects = lhs.getArray(&lhs_count);
668 region_operator<Rect>::region lhs_region(lhs_rects, lhs_count);
669 region_operator<Rect>::region rhs_region(&rhs, 1, dx, dy);
670 region_operator<Rect> operation(op, lhs_region, rhs_region);
686 const Region& lhs, const Rect& rhs)
698 Rect* rects = reg.mStorage.editArray();
719 return mStorage.size() * sizeof(Rect);
726 Rect* rects = reinterpret_cast<Rect*>(buffer);
727 memcpy(rects, mStorage.array(), mStorage.size() * sizeof(Rect));
733 if (size >= sizeof(Rect)) {
734 Rect const* rects = reinterpret_cast<Rect const*>(buffer);
735 size_t count = size / sizeof(Rect);
742 memcpy(result.mStorage.editArray(), rects, count*sizeof(Rect));
768 Rect const* Region::getArray(size_t* count) const {
776 // We can get to the SharedBuffer of a Vector<Rect> because Rect has