Go to the source code of this file.
◆ DEF_FUZZ()
DEF_FUZZ |
( |
PolyUtils |
, |
|
|
fuzz |
|
|
) |
| |
Definition at line 28 of file FuzzPolyUtils.cpp.
28 {
30 fuzz->nextRange(&
count, 0, 512);
32 for (
int index = 0; index <
count; ++index) {
33 fuzz->next(&polygon[index].fX, &polygon[index].fY);
35 }
38
42
44 if (isConvex) {
48 }
49
50 if (isSimple) {
52
53
54 fuzz->nextRange(&
offset, -1000, 1000);
56
58 for (
int index = 0; index <
count; ++index) {
59 fuzz->next(&indexMap[index]);
60 }
63 }
64}
static SkPoint sanitize_point(const SkPoint &in)
bool SkIsConvexPolygon(const SkPoint *polygonVerts, int polygonSize)
bool SkTriangulateSimplePolygon(const SkPoint *polygonVerts, uint16_t *indexMap, int polygonSize, SkTDArray< uint16_t > *triangleIndices)
bool SkOffsetSimplePolygon(const SkPoint *inputPolygonVerts, int inputPolygonSize, const SkRect &bounds, SkScalar offset, SkTDArray< SkPoint > *offsetPolygon, SkTDArray< int > *polygonIndices)
bool SkIsSimplePolygon(const SkPoint *polygon, int polygonSize)
int SkGetPolygonWinding(const SkPoint *polygonVerts, int polygonSize)
bool SkInsetConvexPolygon(const SkPoint *inputPolygonVerts, int inputPolygonSize, SkScalar inset, SkTDArray< SkPoint > *insetPolygon)
Optional< SkRect > bounds
static SkRect inset(const SkRect &r)
◆ ignoreResult()
void ignoreResult |
( |
bool |
| ) |
|
|
inline |
◆ sanitize_point()