|
bool | isFinite () const |
| Returns true if all of the points in this path are finite, meaning there are no infinities and no NaNs.
|
|
uint32_t | getSegmentMasks () const |
| Returns a mask, where each bit corresponding to a SegmentMask is set if the path contains 1 or more segments of that type. More...
|
|
bool | isOval (SkRect *rect, bool *isCCW, unsigned *start) const |
| Returns true if the path is an oval. More...
|
|
bool | isRRect (SkRRect *rrect, bool *isCCW, unsigned *start) const |
|
bool | hasComputedBounds () const |
|
const SkRect & | getBounds () const |
| Returns the bounds of the path's points. More...
|
|
SkRRect | getRRect () const |
|
int | countPoints () const |
|
int | countVerbs () const |
|
int | countWeights () const |
|
const uint8_t * | verbs () const |
| Returns a pointer one beyond the first logical verb (last verb in memory order).
|
|
const uint8_t * | verbsMemBegin () const |
| Returns a const pointer to the first verb in memory (which is the last logical verb).
|
|
const SkPoint * | points () const |
| Returns a const pointer to the first point.
|
|
const SkPoint * | pointsEnd () const |
| Shortcut for this->points() + this->countPoints()
|
|
const SkScalar * | conicWeights () const |
|
const SkScalar * | conicWeightsEnd () const |
|
uint8_t | atVerb (int index) const |
| Convenience methods for getting to a verb or point by index.
|
|
const SkPoint & | atPoint (int index) const |
|
bool | operator== (const SkPathRef &ref) const |
|
void | writeToBuffer (SkWBuffer *buffer) const |
| Writes the path points and verbs to a buffer.
|
|
uint32_t | writeSize () const |
| Gets the number of bytes that would be written in writeBuffer()
|
|
void | interpolate (const SkPathRef &ending, SkScalar weight, SkPathRef *out) const |
|
uint32_t | genID () const |
| Gets an ID that uniquely identifies the contents of the path ref. More...
|
|
void | addGenIDChangeListener (GenIDChangeListener *listener) |
|
void | validate () const |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
void | deref () const |
|
|
void | copy (const SkPathRef &ref, int additionalReserveVerbs, int additionalReservePoints) |
|
void | computeBounds () const |
|
void | setBounds (const SkRect &rect) |
|
void | incReserve (int additionalVerbs, int additionalPoints) |
| Makes additional room but does not change the counts or change the genID.
|
|
void | resetToSize (int verbCount, int pointCount, int conicCount, int reserveVerbs=0, int reservePoints=0) |
| Resets the path ref with verbCount verbs and pointCount points, all uninitialized. More...
|
|
SkPoint * | growForRepeatedVerb (intverb, int numVbs, SkScalar **weights) |
| Increases the verb count by numVbs and point count by the required amount. More...
|
|
SkPoint * | growForVerb (intverb, SkScalar weight) |
| Increases the verb count 1, records the new verb, and creates room for the requisite number of additional points. More...
|
|
void | makeSpace (size_t size) |
| Ensures that the free space available in the path ref is >= size. More...
|
|
uint8_t * | verbsMemWritable () |
| Private, non-const-ptr version of the public function verbsMemBegin().
|
|
size_t | currSize () const |
| Gets the total amount of space allocated for verbs, points, and reserve.
|
|
void | setIsOval (bool isOval, bool isCCW, unsigned start) |
|
void | setIsRRect (bool isRRect, bool isCCW, unsigned start) |
|
SkPoint * | getPoints () |
|
const SkPoint * | getPoints () const |
|
void | callGenIDChangeListeners () |
|
Holds the path verbs and points.
It is versioned by a generation ID. None of its public methods modify the contents. To modify or append to the verbs/points wrap the SkPathRef in an SkPathRef::Editor object. Installing the editor resets the generation ID. It also performs copy-on-write if the SkPathRef is shared by multiple SkPaths. The caller passes the Editor's constructor a SkAutoTUnref, which may be updated to point to a new SkPathRef after the editor's constructor returns.
The points and verbs are stored in a single allocation. The points are at the begining of the allocation while the verbs are stored at end of the allocation, in reverse order. Thus the points and verbs both grow into the middle of the allocation until the meet. To access verb i in the verb array use ref.verbs()[~i] (because verbs() returns a pointer just beyond the first logical verb or the last verb in memory).
const SkRect& SkPathRef::getBounds |
( |
| ) |
const |
|
inline |
Returns the bounds of the path's points.
If the path contains 0 or 1 points, the bounds is set to (0,0,0,0), and isEmpty() will return true. Note: this bounds may be larger than the actual shape, since curves do not extend as far as their control points.