Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: include/core/SkRegion.h

Issue 19366008: Add getRectCount to SkRegtion (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/core/SkRegion.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2005 The Android Open Source Project 3 * Copyright 2005 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkRegion_DEFINED 10 #ifndef SkRegion_DEFINED
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 /** Return true if this region consists of more than 1 rectangular area */ 79 /** Return true if this region consists of more than 1 rectangular area */
80 bool isComplex() const { return !this->isEmpty() && !this->isRect(); } 80 bool isComplex() const { return !this->isEmpty() && !this->isRect(); }
81 81
82 /** 82 /**
83 * Return the bounds of this region. If the region is empty, returns an 83 * Return the bounds of this region. If the region is empty, returns an
84 * empty rectangle. 84 * empty rectangle.
85 */ 85 */
86 const SkIRect& getBounds() const { return fBounds; } 86 const SkIRect& getBounds() const { return fBounds; }
87 87
88 /** 88 /**
89 * Returns the number of rects that comprise this region.
reed1 2013/07/17 19:14:36 I'd like to make the definition a little fuzzier,
vmpstr 2013/07/17 19:59:08 Done.
90 * Experimental: please do not use this unless absolutely necessary.
91 */
92 int getRectCount() const;
93
94 /**
89 * Returns true if the region is non-empty, and if so, appends the 95 * Returns true if the region is non-empty, and if so, appends the
90 * boundary(s) of the region to the specified path. 96 * boundary(s) of the region to the specified path.
91 * If the region is empty, returns false, and path is left unmodified. 97 * If the region is empty, returns false, and path is left unmodified.
92 */ 98 */
93 bool getBoundaryPath(SkPath* path) const; 99 bool getBoundaryPath(SkPath* path) const;
94 100
95 /** 101 /**
96 * Set the region to be empty, and return false, since the resulting 102 * Set the region to be empty, and return false, since the resulting
97 * region is empty 103 * region is empty
98 */ 104 */
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 static bool Oper(const SkRegion&, const SkRegion&, SkRegion::Op, SkRegion*); 433 static bool Oper(const SkRegion&, const SkRegion&, SkRegion::Op, SkRegion*);
428 434
429 friend struct RunHead; 435 friend struct RunHead;
430 friend class Iterator; 436 friend class Iterator;
431 friend class Spanerator; 437 friend class Spanerator;
432 friend class SkRgnBuilder; 438 friend class SkRgnBuilder;
433 friend class SkFlatRegion; 439 friend class SkFlatRegion;
434 }; 440 };
435 441
436 #endif 442 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698