 |
Skia
2D Graphics Library
|
Go to the documentation of this file.
8 #ifndef SkPathMeasure_DEFINED
9 #define SkPathMeasure_DEFINED
13 #include "include/private/SkTDArray.h"
46 kGetPosition_MatrixFlag = 0x01,
47 kGetTangent_MatrixFlag = 0x02,
48 kGetPosAndTan_MatrixFlag = kGetPosition_MatrixFlag | kGetTangent_MatrixFlag
bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix *matrix, MatrixFlags flags=kGetPosAndTan_MatrixFlag)
Pins distance to 0 <= distance <= getLength(), and then computes the corresponding matrix (by calling...
bool isClosed()
Return true if the current contour is closed()
MatrixFlags
Definition: SkPathMeasure.h:45
bool getSegment(SkScalar startD, SkScalar stopD, SkPath *dst, bool startWithMoveTo)
Given a start and stop distance, return in dst the intervening segment(s).
SkPathMeasure(const SkPath &path, bool forceClosed, SkScalar resScale=1)
Initialize the pathmeasure with the specified path.
Definition: SkPoint.h:160
#define SK_API
Definition: SkTypes.h:181
bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent)
Pins distance to 0 <= distance <= getLength(), and then computes the corresponding position and tange...
SkScalar getLength()
Return the total length of the current contour, or 0 if no path is associated (e.g.
float SkScalar
Definition: SkScalar.h:16
bool nextContour()
Move to the next contour in the path.
Definition: SkMatrix.h:48
#define SK_WARN_UNUSED_RESULT
Definition: SkTypes.h:60
Definition: SkContourMeasure.h:91
void setPath(const SkPath *, bool forceClosed)
Reset the pathmeasure with the specified path.
Definition: SkPathMeasure.h:15