Skia
2D Graphics Library
SkContourMeasureIter Class Reference

#include <SkContourMeasure.h>

Public Member Functions

 SkContourMeasureIter ()
 
 SkContourMeasureIter (const SkPath &path, bool forceClosed, SkScalar resScale=1)
 Initialize the Iter with a path. More...
 
 ~SkContourMeasureIter ()
 
 SkContourMeasureIter (SkContourMeasureIter &&)
 
SkContourMeasureIteroperator= (SkContourMeasureIter &&)
 
void reset (const SkPath &path, bool forceClosed, SkScalar resScale=1)
 Reset the Iter with a path. More...
 
sk_sp< SkContourMeasurenext ()
 Iterates through contours in path, returning a contour-measure object for each contour in the path. More...
 

Constructor & Destructor Documentation

◆ SkContourMeasureIter() [1/3]

SkContourMeasureIter::SkContourMeasureIter ( )

◆ SkContourMeasureIter() [2/3]

SkContourMeasureIter::SkContourMeasureIter ( const SkPath path,
bool  forceClosed,
SkScalar  resScale = 1 
)

Initialize the Iter with a path.

The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.

resScale controls the precision of the measure. values > 1 increase the precision (and possibly slow down the computation).

◆ ~SkContourMeasureIter()

SkContourMeasureIter::~SkContourMeasureIter ( )

◆ SkContourMeasureIter() [3/3]

SkContourMeasureIter::SkContourMeasureIter ( SkContourMeasureIter &&  )

Member Function Documentation

◆ next()

sk_sp<SkContourMeasure> SkContourMeasureIter::next ( )

Iterates through contours in path, returning a contour-measure object for each contour in the path.

Returns null when it is done.

This only returns non-zero length contours, where a contour is the segments between a kMove_Verb and either ...

  • the next kMove_Verb
  • kClose_Verb (1 or more)
  • kDone_Verb If it encounters a zero-length contour, it is skipped.

◆ operator=()

SkContourMeasureIter& SkContourMeasureIter::operator= ( SkContourMeasureIter &&  )

◆ reset()

void SkContourMeasureIter::reset ( const SkPath path,
bool  forceClosed,
SkScalar  resScale = 1 
)

Reset the Iter with a path.

The parts of the path that are needed are copied, so the client is free to modify/delete the path after this call.


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