Home | History | Annotate | Download | only in base

Lines Matching refs:region

5 #include "cc/base/region.h"
13 Region::Region() {
16 Region::Region(const Region& region)
17 : skregion_(region.skregion_) {
20 Region::Region(const gfx::Rect& rect)
24 Region::~Region() {
27 const Region& Region::operator=(const gfx::Rect& rect) {
32 const Region& Region::operator=(const Region& region) {
33 skregion_ = region.skregion_;
37 void Region::Swap(Region* region) {
38 region->skregion_.swap(skregion_);
41 void Region::Clear() {
45 bool Region::IsEmpty() const {
49 int Region::GetRegionComplexity() const {
53 bool Region::Contains(const gfx::Point& point) const {
57 bool Region::Contains(const gfx::Rect& rect) const {
63 bool Region::Contains(const Region& region) const {
64 if (region.IsEmpty())
66 return skregion_.contains(region.skregion_);
69 bool Region::Intersects(const gfx::Rect& rect) const {
73 bool Region::Intersects(const Region& region) const {
74 return skregion_.intersects(region.skregion_);
77 void Region::Subtract(const gfx::Rect& rect) {
81 void Region::Subtract(const Region& region) {
82 skregion_.op(region.skregion_, SkRegion::kDifference_Op);
85 void Region::Subtract(const SimpleEnclosedRegion& region) {
86 for (size_t i = 0; i < region.GetRegionComplexity(); ++i) {
87 skregion_.op(gfx::RectToSkIRect(region.GetRect(i)),
92 void Region::Union(const gfx::Rect& rect) {
96 void Region::Union(const Region& region) {
97 skregion_.op(region.skregion_, SkRegion::kUnion_Op);
100 void Region::Intersect(const gfx::Rect& rect) {
104 void Region::Intersect(const Region& region) {
105 skregion_.op(region.skregion_, SkRegion::kIntersect_Op);
108 std::string Region::ToString() const {
121 scoped_ptr<base::Value> Region::AsValue() const {
133 void Region::AsValueInto(base::debug::TracedValue* result) const {
143 Region::Iterator::Iterator() {
146 Region::Iterator::Iterator(const Region& region)
147 : it_(region.skregion_) {
150 Region::Iterator::~Iterator() {