 |
Skia
2D Graphics Library
|
Go to the documentation of this file.
8 #ifndef SkContourMeasure_DEFINED
9 #define SkContourMeasure_DEFINED
13 #include "include/private/SkTDArray.h"
30 kGetPosition_MatrixFlag = 0x01,
31 kGetTangent_MatrixFlag = 0x02,
32 kGetPosAndTan_MatrixFlag = kGetPosition_MatrixFlag | kGetTangent_MatrixFlag
41 MatrixFlags flags = kGetPosAndTan_MatrixFlag)
const;
50 bool startWithMoveTo)
const;
60 unsigned fTValue : 30;
66 static const Segment* Next(
const Segment* seg) {
67 unsigned ptIndex = seg->fPtIndex;
70 }
while (seg->fPtIndex == ptIndex);
76 const SkTDArray<Segment> fSegments;
77 const SkTDArray<SkPoint> fPts;
128 std::unique_ptr<Impl> fImpl;
SkScalar length() const
Return the length of the contour.
Definition: SkContourMeasure.h:21
Definition: SkRefCnt.h:118
SkContourMeasureIter(const SkPath &path, bool forceClosed, SkScalar resScale=1)
Initialize the Iter with a path.
bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent) const
Pins distance to 0 <= distance <= length(), and then computes the corresponding position and tangent.
Definition: SkPoint.h:160
#define SK_API
Definition: SkTypes.h:181
bool SK_WARN_UNUSED_RESULT getSegment(SkScalar startD, SkScalar stopD, SkPath *dst, bool startWithMoveTo) const
Given a start and stop distance, return in dst the intervening segment(s).
Definition: SkContourMeasure.h:17
sk_sp< SkContourMeasure > next()
Iterates through contours in path, returning a contour-measure object for each contour in the path.
float SkScalar
Definition: SkScalar.h:16
Definition: SkMatrix.h:48
#define SK_WARN_UNUSED_RESULT
Definition: SkTypes.h:60
bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix *matrix, MatrixFlags flags=kGetPosAndTan_MatrixFlag) const
Pins distance to 0 <= distance <= getLength(), and then computes the corresponding matrix (by calling...
Definition: SkContourMeasure.h:91
bool isClosed() const
Return true if the contour is closed()
Definition: SkContourMeasure.h:54
void reset(const SkPath &path, bool forceClosed, SkScalar resScale=1)
Reset the Iter with a path.
MatrixFlags
Definition: SkContourMeasure.h:29