Flutter Engine
The Flutter Engine
Functions
contour_measure.cpp File Reference
#include "export.h"
#include "helpers.h"
#include "third_party/skia/include/core/SkContourMeasure.h"
#include "third_party/skia/include/core/SkPath.h"

Go to the source code of this file.

Functions

SKWASM_EXPORT SkContourMeasureItercontourMeasureIter_create (SkPath *path, bool forceClosed, SkScalar resScale)
 
SKWASM_EXPORT SkContourMeasurecontourMeasureIter_next (SkContourMeasureIter *iter)
 
SKWASM_EXPORT void contourMeasureIter_dispose (SkContourMeasureIter *iter)
 
SKWASM_EXPORT void contourMeasure_dispose (SkContourMeasure *measure)
 
SKWASM_EXPORT SkScalar contourMeasure_length (SkContourMeasure *measure)
 
SKWASM_EXPORT bool contourMeasure_isClosed (SkContourMeasure *measure)
 
SKWASM_EXPORT bool contourMeasure_getPosTan (SkContourMeasure *measure, SkScalar distance, SkPoint *outPosition, SkVector *outTangent)
 
SKWASM_EXPORT SkPathcontourMeasure_getSegment (SkContourMeasure *measure, SkScalar startD, SkScalar stopD, bool startWithMoveTo)
 

Function Documentation

◆ contourMeasure_dispose()

SKWASM_EXPORT void contourMeasure_dispose ( SkContourMeasure measure)

Definition at line 31 of file contour_measure.cpp.

31 {
32 measure->unref();
33}
void unref() const
Definition: SkRefCnt.h:72

◆ contourMeasure_getPosTan()

SKWASM_EXPORT bool contourMeasure_getPosTan ( SkContourMeasure measure,
SkScalar  distance,
SkPoint outPosition,
SkVector outTangent 
)

Definition at line 43 of file contour_measure.cpp.

46 {
47 return measure->getPosTan(distance, outPosition, outTangent);
48}
bool getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent) const

◆ contourMeasure_getSegment()

SKWASM_EXPORT SkPath * contourMeasure_getSegment ( SkContourMeasure measure,
SkScalar  startD,
SkScalar  stopD,
bool  startWithMoveTo 
)

Definition at line 50 of file contour_measure.cpp.

53 {
54 SkPath* outPath = new SkPath();
55 if (!measure->getSegment(startD, stopD, outPath, startWithMoveTo)) {
56 delete outPath;
57 return nullptr;
58 }
59 return outPath;
60}
bool getSegment(SkScalar startD, SkScalar stopD, SkPath *dst, bool startWithMoveTo) const
Definition: SkPath.h:59

◆ contourMeasure_isClosed()

SKWASM_EXPORT bool contourMeasure_isClosed ( SkContourMeasure measure)

Definition at line 39 of file contour_measure.cpp.

39 {
40 return measure->isClosed();
41}
bool isClosed() const

◆ contourMeasure_length()

SKWASM_EXPORT SkScalar contourMeasure_length ( SkContourMeasure measure)

Definition at line 35 of file contour_measure.cpp.

35 {
36 return measure->length();
37}
SkScalar length() const

◆ contourMeasureIter_create()

SKWASM_EXPORT SkContourMeasureIter * contourMeasureIter_create ( SkPath path,
bool  forceClosed,
SkScalar  resScale 
)

Definition at line 14 of file contour_measure.cpp.

14 {
15 return new SkContourMeasureIter(*path, forceClosed, resScale);
16}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57

◆ contourMeasureIter_dispose()

SKWASM_EXPORT void contourMeasureIter_dispose ( SkContourMeasureIter iter)

Definition at line 27 of file contour_measure.cpp.

27 {
28 delete iter;
29}

◆ contourMeasureIter_next()

SKWASM_EXPORT SkContourMeasure * contourMeasureIter_next ( SkContourMeasureIter iter)

Definition at line 18 of file contour_measure.cpp.

19 {
20 auto next = iter->next();
21 if (next) {
22 next->ref();
23 }
24 return next.get();
25}
static float next(float f)
sk_sp< SkContourMeasure > next()