Lines Matching refs:region
42 Iterator(const SkRegion& region);
44 void reset(const SkRegion& region);
63 SkRegion region;
64 region.setRect({1, 2, 3, 4});
65 iter.reset(region);
79 #Method Iterator(const SkRegion& region)
84 SkRegion region;
85 region.setRect({1, 2, 3, 4});
86 SkRegion::Iterator iter(region);
116 SkRegion region;
117 iter.reset(region);
118 debugster("empty region", iter, true);
119 region.setRect({1, 2, 3, 4});
120 iter.reset(region);
127 empty region rewind success=true
128 empty region rect={0,0,0,0}
141 #Method void reset(const SkRegion& region)
149 SkRegion region;
150 SkRegion::Iterator iter(region);
151 debugster("empty region", iter);
152 region.setRect({1, 2, 3, 4});
154 iter.reset(region);
157 empty region: done=true
174 SkRegion region;
175 SkRegion::Iterator iter(region);
177 region.setRect({1, 2, 3, 4});
197 SkRegion region;
199 region.setRects(rects, SK_ARRAY_COUNT(rects));
200 SkRegion::Iterator iter(region);
224 SkRegion region;
225 SkRegion::Iterator iter(region);
228 region.setRect({1, 2, 3, 4});
250 SkRegion region;
252 region.setRects(rects, SK_ARRAY_COUNT(rects));
253 SkRegion::Iterator iter(region);
274 Cliperator(const SkRegion& region, const SkIRect& clip);
286 #Method Cliperator(const SkRegion& region, const SkIRect& clip)
291 SkRegion region;
292 region.setRect({1, 2, 3, 4});
293 SkRegion::Cliperator clipper(region, {0, 0, 2, 3});
312 auto debugster = [](const char* label, SkRegion& region) -> void {
313 SkRegion::Cliperator clipper(region, {0, 0, 5, 5});
316 SkRegion region;
317 debugster("empty region", region);
318 region.setRect({1, 2, 3, 4});
319 debugster("after add rect", region);
321 empty region done=true
337 SkRegion region;
339 region.setRects(rects, SK_ARRAY_COUNT(rects));
340 SkRegion::Cliperator clipper(region, {0, 3, 8, 7});
364 auto debugster = [](const char* label, SkRegion& region) -> void {
365 SkRegion::Cliperator clipper(region, {0, 0, 5, 3});
369 SkRegion region;
370 debugster("empty region", region);
371 region.setRect({1, 2, 3, 4});
372 debugster("after set rect", region);
375 empty region rect={1094713344,1065353216,0,-1}
394 Spanerator(const SkRegion& region, int y, int left, int right);
403 #Method Spanerator(const SkRegion& region, int y, int left, int right)
408 SkRegion region;
409 region.setRect({1, 2, 3, 4});
410 SkRegion::Spanerator spanner(region, 3, 2, 4);
427 auto debugster = [](const char* label, SkRegion& region) -> void {
428 SkRegion::Spanerator spanner(region, 3, 2, 4);
435 SkRegion region;
436 debugster("empty region", region);
437 region.setRect({1, 2, 3, 4});
438 debugster("after set rect", region);
440 empty region: result=false
459 SkRegion region;
460 SkIRect r = region.getBounds();
461 SkDebugf("region bounds: {%d, %d, %d, %d}\n", r.fLeft, r.fTop, r.fRight, r.fBottom);
463 region bounds: {0, 0, 0, 0}
473 #Method SkRegion(const SkRegion& region)
479 auto debugster = [](const char* label, SkRegion& region) -> void {
480 auto r = region.getBounds();
483 SkRegion region({1, 2, 3, 4});
484 SkRegion region2(region);
485 debugster("region bounds", region);
487 region.setEmpty();
488 SkDebugf(" after region set empty:\n");
489 debugster("region bounds", region);
492 region bounds: {1,2,3,4}
494 after region set empty:
495 region bounds: {0,0,0,0}
500 #SeeAlso setRegion operator=(const SkRegion& region)
512 SkRegion region({1, 2, 3, 4});
515 SkDebugf("region %c= region2\n", region == region2 ? '=' : '!');
533 SkRegion* region = new SkRegion({1, 2, 3, 4});
534 SkRegion region2(*region);
535 delete region;
543 …Also SkRegion() SkRegion(const SkRegion& region) SkRegion(const SkIRect& rect) operator=(const SkR…
549 #Method SkRegion& operator=(const SkRegion& region)
555 auto debugster = [](const char* label, SkRegion& region) -> void {
556 auto r = region.getBounds();
569 #SeeAlso set swap SkRegion(const SkRegion& region)
598 #SeeAlso operator!=(const SkRegion& other) const operator=(const SkRegion& region)
628 #SeeAlso operator==(const SkRegion& other) const operator=(const SkRegion& region)
640 auto debugster = [](const char* label, SkRegion& region) -> void {
641 auto r = region.getBounds();
655 #SeeAlso operator=(const SkRegion& region) swap SkRegion(const SkRegion& region)
667 auto debugster = [](const char* label, SkRegion& region) -> void {
668 auto r = region.getBounds();
682 #SeeAlso operator=(const SkRegion& region) set SkRegion(const SkRegion& region)
694 auto debugster = [](const char* label, SkRegion& region) -> void {
695 SkDebugf("%14s: region is %s" "empty\n", label, region.isEmpty() ? "" : "not ");
697 SkRegion region;
698 debugster("initial", region);
699 region.setRect({1, 2, 3, 4});
700 debugster("set rect", region);
701 region.setEmpty();
702 debugster("set empty", region);
704 initial: region is empty
705 set rect: region is not empty
706 set empty: region is empty
722 auto debugster = [](const char* label, const SkRegion& region) -> void {
723 SkDebugf("%s: region is %s" "rect\n", label, region.isRect() ? "" : "not ");
725 SkRegion region;
726 debugster("initial", region);
727 region.setRect({1, 2, 3, 4});
728 debugster("set rect", region);
729 region.setEmpty();
730 debugster("set empty", region);
732 initial: region is not rect
733 set rect: region is rect
734 set empty: region is not rect
750 auto debugster = [](const char* label, const SkRegion& region) -> void {
751 SkDebugf("%s: region is %s" "complex\n", label, region.isComplex() ? "" : "not ");
753 SkRegion region;
754 debugster("initial", region);
755 region.setRect({1, 2, 3, 4});
756 debugster("set rect", region);
757 region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
758 debugster("op rect", region);
760 initial: region is not complex
761 set rect: region is not complex
762 op rect: region is complex
778 SkRegion region({1, 2, 3, 4});
779 region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
780 auto r = region.getBounds();
799 auto debugster = [](const char* label, const SkRegion& region) -> void {
800 SkDebugf("%s: region complexity %d\n", label, region.computeRegionComplexity());
802 SkRegion region;
803 debugster("initial", region);
804 region.setRect({1, 2, 3, 4});
805 debugster("set rect", region);
806 region.op({2, 3, 4, 5}, SkRegion::kUnion_Op);
807 debugster("op rect", region);
809 initial: region complexity 0
810 set rect: region complexity 1
811 op rect: region complexity 3
828 SkRegion region;
829 region.setRect({10, 20, 90, 60});
830 region.op({30, 40, 60, 80}, SkRegion::kXOR_Op);
831 canvas->drawRegion(region, SkPaint());
833 region.getBoundaryPath(&path);
850 auto debugster = [](const char* label, SkRegion& region) -> void {
851 auto r = region.getBounds();
854 SkRegion region({1, 2, 3, 4});
855 debugster("region bounds", region);
856 region.setEmpty();
857 SkDebugf(" after region set empty:\n");
858 debugster("region bounds", region);
860 region bounds: {1,2,3,4}
861 after region set empty:
862 region bounds: {0,0,0,0}
878 SkRegion region({1, 2, 3, 4});
879 SkDebugf("region is %s" "empty\n", region.isEmpty() ? "" : "not ");
880 bool setEmpty = region.setRect({1, 2, 1, 4});
881 SkDebugf("region is %s" "empty\n", region.isEmpty() ? "" : "not ");
884 region is not empty
885 region is empty
902 auto debugster = [](const char* label, bool success, SkRegion& region) -> void {
903 auto r = region.getBounds();
907 SkRegion region;
908 bool success = region.setRect(1, 2, 3, 4);
909 debugster("set to: 1,2,3,4", success, region);
910 success = region.setRect(3, 2, 1, 4);
911 debugster("set to: 3,2,1,4", success, region);
932 SkRegion region;
933 region.setRects(rects, SK_ARRAY_COUNT(rects));
934 canvas->drawRegion(region, SkPaint());
935 region.setEmpty();
937 region.op(add, SkRegion::kUnion_Op);
939 region.translate(100, 0);
940 canvas->drawRegion(region, SkPaint());
949 #Method bool setRegion(const SkRegion& region)
955 auto debugster = [](const char* label, SkRegion& region) -> void {
956 auto r = region.getBounds();
959 SkRegion region({1, 2, 3, 4});
961 region2.setRegion(region);
962 debugster("region bounds", region);
965 SkDebugf(" after region set empty:\n");
966 debugster("region bounds", region);
969 region bounds: {1,2,3,4}
971 after region set empty:
972 region bounds: {1,2,3,4}
977 #SeeAlso SkRegion(const SkRegion& region)
996 SkRegion region;
997 region.setPath(textPath, clipRegion);
998 canvas->drawRegion(region, SkPaint());
1023 SkRegion region;
1024 region.setPath(textPath, SkRegion({0, 0, 256, 256}));
1025 canvas->drawRegion(region, SkPaint());
1027 paint.setColor(region.intersects(iRect) ? SK_ColorBLUE : SK_ColorRED);
1153 SkRegion region({1, 2, 3, 4});
1155 SkDebugf("quickContains 1: %s\n", region.quickContains(test) ? "true" : "false");
1156 region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
1157 SkDebugf("quickContains 2: %s\n", region.quickContains(test) ? "true" : "false");
1158 region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);
1159 SkDebugf("quickContains 3: %s\n", region.quickContains(test) ? "true" : "false");
1178 auto debugster = [](const char* label, SkRegion& region) -> void {
1179 SkDebugf("%s: %s\n", label, region.quickContains(2, 2, 3, 3) ? "true" : "false");
1181 SkRegion region({1, 2, 3, 4});
1182 debugster("quickContains 1", region);
1183 region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
1184 debugster("quickContains 2", region);
1185 region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);
1186 debugster("quickContains 3", region);
1206 SkRegion region({1, 2, 3, 4});
1208 SkDebugf("quickReject 1: %s\n", region.quickReject(test) ? "true" : "false");
1209 region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
1210 SkDebugf("quickReject 2: %s\n", region.quickReject(test) ? "true" : "false");
1211 region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);
1212 SkDebugf("quickReject 3: %s\n", region.quickReject(test) ? "true" : "false");
1230 SkRegion region({1, 2, 3, 4});
1234 SkDebugf("quickReject 1: %s\n", region.quickReject(test) ? "true" : "false");
1235 region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
1236 SkDebugf("quickReject 2: %s\n", region.quickReject(test) ? "true" : "false");
1237 region.op({4, 7, 5, 8}, SkRegion::kUnion_Op);
1238 SkDebugf("quickReject 3: %s\n", region.quickReject(test) ? "true" : "false");
1568 SkRegion region({20, 20, 80, 80});
1569 size_t size = region.writeToMemory(nullptr);
1571 region.writeToMemory(data->writable_data());