![]() |
Flutter Engine
The Flutter Engine
|
#include <SkContourMeasure.h>
Public Types | |
enum | MatrixFlags { kGetPosition_MatrixFlag = 0x01 , kGetTangent_MatrixFlag = 0x02 , kGetPosAndTan_MatrixFlag = kGetPosition_MatrixFlag | kGetTangent_MatrixFlag } |
Public Member Functions | |
SkScalar | length () const |
bool | getPosTan (SkScalar distance, SkPoint *position, SkVector *tangent) const |
bool | getMatrix (SkScalar distance, SkMatrix *matrix, MatrixFlags flags=kGetPosAndTan_MatrixFlag) const |
bool | getSegment (SkScalar startD, SkScalar stopD, SkPath *dst, bool startWithMoveTo) const |
bool | isClosed () const |
![]() | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Friends | |
class | SkContourMeasureIter |
class | SkPathMeasurePriv |
Definition at line 22 of file SkContourMeasure.h.
Enumerator | |
---|---|
kGetPosition_MatrixFlag | |
kGetTangent_MatrixFlag | |
kGetPosAndTan_MatrixFlag |
Definition at line 33 of file SkContourMeasure.h.
bool SkContourMeasure::getMatrix | ( | SkScalar | distance, |
SkMatrix * | matrix, | ||
MatrixFlags | flags = kGetPosAndTan_MatrixFlag |
||
) | const |
Pins distance to 0 <= distance <= getLength(), and then computes the corresponding matrix (by calling getPosTan). Returns false if there is no path, or a zero-length path was specified, in which case matrix is unchanged.
Definition at line 633 of file SkContourMeasure.cpp.
bool SkContourMeasure::getPosTan | ( | SkScalar | distance, |
SkPoint * | position, | ||
SkVector * | tangent | ||
) | const |
Pins distance to 0 <= distance <= length(), and then computes the corresponding position and tangent.
Definition at line 607 of file SkContourMeasure.cpp.
bool SkContourMeasure::getSegment | ( | SkScalar | startD, |
SkScalar | stopD, | ||
SkPath * | dst, | ||
bool | startWithMoveTo | ||
) | const |
Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. startD and stopD are pinned to legal values (0..getLength()). If startD > stopD then return false (and leave dst untouched). Begin the segment with a moveTo if startWithMoveTo is true
Definition at line 653 of file SkContourMeasure.cpp.
|
inline |
Return true if the contour is closed()
Definition at line 58 of file SkContourMeasure.h.
|
inline |
Return the length of the contour.
Definition at line 26 of file SkContourMeasure.h.
|
friend |
Definition at line 92 of file SkContourMeasure.h.
|
friend |
Definition at line 93 of file SkContourMeasure.h.