7 auto debugster = [](
const char* prefix,
const SkPath& path) ->
void {
11 path.isRect(&rect, &isClosed, &direction) ?
12 SkDebugf(
"%s is rect (%g, %g, %g, %g); is %s" "closed; direction %s\n", prefix,
13 rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, isClosed ?
"" :
"not ",
15 SkDebugf(
"%s is not rect\n", prefix);
18 debugster(
"empty", path);
19 path.addRect({10, 20, 30, 40});
20 debugster(
"addRect", path);
22 debugster(
"moveTo", path);
24 debugster(
"lineTo", path);
26 const SkPoint pts[] = { {0, 0}, {0, 80}, {80, 80}, {80, 0}, {40, 0}, {20, 0} };
27 path.addPoly(pts, std::size(pts),
false);
28 debugster(
"addPoly", path);