7 auto debugster = [](
const char* prefix,
const SkPath& path, uint8_t* verbs,
int max) ->
void {
8 int count = path.getVerbs(verbs,
max);
10 const char* verbStr[] = {
"move",
"line",
"quad",
"conic",
"cubic",
"close" };
11 for (
int i = 0; i < std::min(
count,
max) && verbs; ++i) {
18 path.lineTo(-10, -10);
20 debugster(
"no verbs", path,
nullptr, 0);
21 debugster(
"zero max", path, verbs, 0);
22 debugster(
"too small", path, verbs, 2);
23 debugster(
"just right", path, verbs, path.countVerbs());
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
#define REG_FIDDLE(NAME, W, H, TEXT, I)
static float max(float r, float g, float b)