Lines Matching defs:SkRegion
10 #include "SkRegion.h"
13 static void Union(SkRegion* rgn, const SkIRect& rect) {
14 rgn->op(rect, SkRegion::kUnion_Op);
24 SkRegion r;
64 // These test SkRegion::contains(Rect) and SkRegion::contains(Region)
66 SkRegion container;
73 SkRegion rgn;
81 SkRegion valid(SkIRect::MakeWH(10, 10));
82 SkRegion empty, empty2;
110 static void randRgn(SkRandom& rand, SkRegion* rgn, int n) {
113 rgn->op(randRect(rand), SkRegion::kUnion_Op);
117 static bool slow_contains(const SkRegion& outer, const SkRegion& inner) {
118 SkRegion tmp;
119 tmp.op(outer, inner, SkRegion::kUnion_Op);
123 static bool slow_contains(const SkRegion& outer, const SkIRect& r) {
124 SkRegion tmp;
125 tmp.op(outer, SkRegion(r), SkRegion::kUnion_Op);
129 static bool slow_intersects(const SkRegion& outer, const SkRegion& inner) {
130 SkRegion tmp;
131 return tmp.op(outer, inner, SkRegion::kIntersect_Op);
134 static void test_contains_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
135 SkRegion::Iterator iter(rgn);
146 const SkRegion& a, const SkRegion& b) {
163 static void test_intersects_iter(skiatest::Reporter* reporter, const SkRegion& rgn) {
164 SkRegion::Iterator iter(rgn);
175 const SkRegion& a, const SkRegion& b) {
186 const SkRegion& a, const SkRegion&)) {
189 SkRegion outer;
191 SkRegion inner;
206 SkRegion rgn0, rgn1;
209 rgn0.op(rect[i], SkRegion::kUnion_Op);
243 SkRegion rgn0, rgn1;