Flutter Engine
The Flutter Engine
|
#include <SkPath.h>
Public Member Functions | |
Iter () | |
Iter (const SkPath &path, bool forceClose) | |
void | setPath (const SkPath &path, bool forceClose) |
Verb | next (SkPoint pts[4]) |
SkScalar | conicWeight () const |
bool | isCloseLine () const |
bool | isClosedContour () const |
Iterates through verb array, and associated SkPoint array and conic weight. Provides options to treat open contours as closed, and to ignore degenerate data.
SkPath::Iter::Iter | ( | ) |
Initializes SkPath::Iter with an empty SkPath. next() on SkPath::Iter returns kDone_Verb. Call setPath to initialize SkPath::Iter at a later time.
example: https://fiddle.skia.org/c/@Path_Iter_Iter
Definition at line 1820 of file SkPath.cpp.
SkPath::Iter::Iter | ( | const SkPath & | path, |
bool | forceClose | ||
) |
Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path. If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each open contour. path is not altered.
path | SkPath to iterate |
forceClose | true if open contours generate kClose_Verb |
example: https://fiddle.skia.org/c/@Path_Iter_const_SkPath
Definition at line 1833 of file SkPath.cpp.
|
inline |
bool SkPath::Iter::isClosedContour | ( | ) | const |
Returns true if subsequent calls to next() return kClose_Verb before returning kMove_Verb. if true, contour SkPath::Iter is processing may end with kClose_Verb, or SkPath::Iter may have been initialized with force close set to true.
example: https://fiddle.skia.org/c/@Path_Iter_isClosedContour
Definition at line 1851 of file SkPath.cpp.
|
inline |
Returns true if last kLine_Verb returned by next() was generated by kClose_Verb. When true, the end point returned by next() is also the start point of contour.
If next() has not been called, or next() did not return kLine_Verb, result is undefined.
SkPath::Verb SkPath::Iter::next | ( | SkPoint | pts[4] | ) |
Returns next SkPath::Verb in verb array, and advances SkPath::Iter. When verb array is exhausted, returns kDone_Verb.
Zero to four SkPoint are stored in pts, depending on the returned SkPath::Verb.
pts | storage for SkPoint data describing returned SkPath::Verb |
example: https://fiddle.skia.org/c/@Path_RawIter_next
Definition at line 1901 of file SkPath.cpp.
void SkPath::Iter::setPath | ( | const SkPath & | path, |
bool | forceClose | ||
) |
Sets SkPath::Iter to return elements of verb array, SkPoint array, and conic weight in path. If forceClose is true, SkPath::Iter will add kLine_Verb and kClose_Verb after each open contour. path is not altered.
path | SkPath to iterate |
forceClose | true if open contours generate kClose_Verb |
example: https://fiddle.skia.org/c/@Path_Iter_setPath
Definition at line 1837 of file SkPath.cpp.