Lines Matching defs:Region
17 #define LOG_TAG "Region"
25 #include <ui/Region.h>
51 Region::Region()
56 Region::Region(const Region& rhs)
64 Region::Region(const Rect& rhs)
69 Region::Region(const void* buffer)
72 LOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
75 Region::~Region()
79 Region& Region::operator = (const Region& rhs)
90 Region& Region::makeBoundsSelf()
96 void Region::clear()
102 void Region::set(const Rect& r)
108 void Region::set(uint32_t w, uint32_t h)
116 void Region::addRectUnchecked(int l, int t, int r, int b)
126 Region& Region::orSelf(const Rect& r) {
129 Region& Region::andSelf(const Rect& r) {
132 Region& Region::subtractSelf(const Rect& r) {
135 Region& Region::operationSelf(const Rect& r, int op) {
136 Region lhs(*this);
143 Region& Region::orSelf(const Region& rhs) {
146 Region& Region::andSelf(const Region& rhs) {
149 Region& Region::subtractSelf(const Region& rhs) {
152 Region& Region::operationSelf(const Region& rhs, int op) {
153 Region lhs(*this);
158 Region& Region::translateSelf(int x, int y) {
165 const Region Region::merge(const Rect& rhs) const {
168 const Region Region::intersect(const Rect& rhs) const {
171 const Region Region::subtract(const Rect& rhs) const {
174 const Region Region::operation(const Rect& rhs, int op) const {
175 Region result;
182 const Region Region::merge(const Region& rhs) const {
185 const Region Region::intersect(const Region& rhs) const {
188 const Region Region::subtract(const Region& rhs) const {
191 const Region Region::operation(const Region& rhs, int op) const {
192 Region result;
197 const Region Region::translate(int x, int y) const {
198 Region result;
205 Region& Region::orSelf(const Region& rhs, int dx, int dy) {
208 Region& Region::andSelf(const Region& rhs, int dx, int dy) {
211 Region& Region::subtractSelf(const Region& rhs, int dx, int dy) {
214 Region& Region::operationSelf(const Region& rhs, int dx, int dy, int op) {
215 Region lhs(*this);
222 const Region Region::merge(const Region& rhs, int dx, int dy) const {
225 const Region Region::intersect(const Region& rhs, int dx, int dy) const {
228 const Region Region::subtract(const Region& rhs, int dx, int dy) const {
231 const Region Region::operation(const Region& rhs, int dx, int dy, int op) const {
232 Region result;
239 // This is our region rasterizer, which merges rects and spans together
240 // to obtain an optimal region.
241 class Region::rasterizer : public region_operator<Rect>::region_rasterizer
250 rasterizer(Region& reg)
327 bool Region::validate(const Region& reg, const char* name)
369 void Region::boolean_operation(int op, Region& dst,
370 const Region& lhs,
371 const Region& rhs, int dx, int dy)
385 region_operator<Rect>::region lhs_region(lhs_rects, lhs_count);
386 region_operator<Rect>::region rhs_region(rhs_rects, rhs_count, dx, dy);
433 Region::const_iterator head = dst.begin();
434 Region::const_iterator const tail = dst.end();
478 void Region::boolean_operation(int op, Region& dst,
479 const Region& lhs,
483 LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
489 boolean_operation(op, dst, lhs, Region(rhs), dx, dy);
494 region_operator<Rect>::region lhs_region(lhs_rects, lhs_count);
495 region_operator<Rect>::region rhs_region(&rhs, 1, dx, dy);
505 void Region::boolean_operation(int op, Region& dst,
506 const Region& lhs, const Region& rhs)
511 void Region::boolean_operation(int op, Region& dst,
512 const Region& lhs, const Rect& rhs)
517 void Region::translate(Region& reg, int dx, int dy)
537 void Region::translate(Region& dst, const Region& reg, int dx, int dy)
545 ssize_t Region::write(void* buffer, size_t size) const
564 ssize_t Region::read(const void* buffer)
580 Region::writeEmpty(void* buffer, size_t size)
589 bool Region::isEmpty(void* buffer)
598 Region::const_iterator Region::begin() const {
602 Region::const_iterator Region::end() const {
606 Rect const* Region::getArray(size_t* count) const {
613 size_t Region::getRects(Vector<Rect>& rectList) const
625 void Region::dump(String8& out, const char* what, uint32_t flags) const
634 snprintf(buffer, SIZE, " Region %s (this=%p, count=%d)\n",
645 void Region::dump(const char* what, uint32_t flags) const
650 LOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);