Flutter Engine
The Flutter Engine
|
Enumerations | |
enum class | StrokeRecApplication { kDisallow , kAllow } |
Functions | |
void | CalcDashParameters (SkScalar phase, const SkScalar intervals[], int32_t count, SkScalar *initialDashLength, int32_t *initialDashIndex, SkScalar *intervalLength, SkScalar *adjustedPhase=nullptr) |
bool | FilterDashPath (SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *, const SkPathEffect::DashInfo &info) |
bool | InternalFilter (SkPath *dst, const SkPath &src, SkStrokeRec *rec, const SkRect *cullRect, const SkScalar aIntervals[], int32_t count, SkScalar initialDashLength, int32_t initialDashIndex, SkScalar intervalLength, SkScalar startPhase, StrokeRecApplication=StrokeRecApplication::kAllow) |
bool | ValidDashPath (SkScalar phase, const SkScalar intervals[], int32_t count) |
Variables | |
const SkScalar | kMaxDashCount = 1000000 |
|
strong |
See comments for InternalFilter
Enumerator | |
---|---|
kDisallow | |
kAllow |
Definition at line 36 of file SkDashPathPriv.h.
void SkDashPath::CalcDashParameters | ( | SkScalar | phase, |
const SkScalar | intervals[], | ||
int32_t | count, | ||
SkScalar * | initialDashLength, | ||
int32_t * | initialDashIndex, | ||
SkScalar * | intervalLength, | ||
SkScalar * | adjustedPhase = nullptr |
||
) |
Calculates the initialDashLength, initialDashIndex, and intervalLength based on the inputed phase and intervals. If adjustedPhase is passed in, then the phase will be adjusted to be between 0 and intervalLength. The result will be stored in adjustedPhase. If adjustedPhase is nullptr then it is assumed phase is already between 0 and intervalLength
Caller should have already used ValidDashPath to exclude invalid data.
Definition at line 54 of file SkDashPath.cpp.
bool SkDashPath::FilterDashPath | ( | SkPath * | dst, |
const SkPath & | src, | ||
SkStrokeRec * | rec, | ||
const SkRect * | cullRect, | ||
const SkPathEffect::DashInfo & | info | ||
) |
Definition at line 462 of file SkDashPath.cpp.
bool SkDashPath::InternalFilter | ( | SkPath * | dst, |
const SkPath & | src, | ||
SkStrokeRec * | rec, | ||
const SkRect * | cullRect, | ||
const SkScalar | aIntervals[], | ||
int32_t | count, | ||
SkScalar | initialDashLength, | ||
int32_t | initialDashIndex, | ||
SkScalar | intervalLength, | ||
SkScalar | startPhase, | ||
StrokeRecApplication | strokeRecApplication = StrokeRecApplication::kAllow |
||
) |
Caller should have already used ValidDashPath to exclude invalid data. Typically, this leaves the strokeRec unmodified. However, for some simple shapes (e.g. a line) it may directly evaluate the dash and stroke to produce a stroked output path with a fill strokeRec. Passing true for disallowStrokeRecApplication turns this behavior off.
Definition at line 309 of file SkDashPath.cpp.
Definition at line 476 of file SkDashPath.cpp.
const SkScalar SkDashPath::kMaxDashCount = 1000000 |
Definition at line 32 of file SkDashPathPriv.h.