Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkPathRef::Editor Class Reference

Public Member Functions

 Editor (SkAutoTUnref< SkPathRef > *pathRef, int incReserveVerbs=0, int incReservePoints=0)
 
SkPointpoints ()
 Returns the array of points.
 
const SkPointpoints () const
 
SkPointatPoint (int i)
 Gets the ith point. More...
 
const SkPointatPoint (int i) const
 
SkPointgrowForVerb (intverb, SkScalar weight=0)
 Adds the verb and allocates space for the number of points indicated by the verb. More...
 
SkPointgrowForRepeatedVerb (intverb, int numVbs, SkScalar **weights=NULL)
 Allocates space for multiple instances of a particular verb and the requisite points & weights. More...
 
void resetToSize (int newVerbCnt, int newPointCnt, int newConicCount)
 Resets the path ref to a new verb and point count. More...
 
SkPathRefpathRef ()
 Gets the path ref that is wrapped in the Editor.
 
void setIsOval (bool isOval, bool isCCW, unsigned start)
 
void setIsRRect (bool isRRect, bool isCCW, unsigned start)
 
void setBounds (const SkRect &rect)
 

Private Attributes

SkPathReffPathRef
 

Member Function Documentation

SkPoint* SkPathRef::Editor::atPoint ( int  i)
inline

Gets the ith point.

Shortcut for this->points() + i

SkPoint* SkPathRef::Editor::growForRepeatedVerb ( int  verb,
int  numVbs,
SkScalar **  weights = NULL 
)
inline

Allocates space for multiple instances of a particular verb and the requisite points & weights.

The return pointer points at the first new point (indexed normally []). If 'verb' is kConic_Verb, 'weights' will return a pointer to the space for the conic weights (indexed normally).

SkPoint* SkPathRef::Editor::growForVerb ( int  verb,
SkScalar  weight = 0 
)
inline

Adds the verb and allocates space for the number of points indicated by the verb.

The return value is a pointer to where the points for the verb should be written. 'weight' is only used if 'verb' is kConic_Verb

void SkPathRef::Editor::resetToSize ( int  newVerbCnt,
int  newPointCnt,
int  newConicCount 
)
inline

Resets the path ref to a new verb and point count.

The new verbs and points are uninitialized.


The documentation for this class was generated from the following file: