1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC.
2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h"
4cb93a386Sopenharmony_ci// HASH=799096fdc1298aa815934a74e76570ca
5cb93a386Sopenharmony_ciREG_FIDDLE(Path_Verb, 256, 256, true, 0) {
6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
7cb93a386Sopenharmony_ci    SkPath path;
8cb93a386Sopenharmony_ci    path.lineTo(20, 20);
9cb93a386Sopenharmony_ci    path.quadTo(-10, -10, 30, 30);
10cb93a386Sopenharmony_ci    path.close();
11cb93a386Sopenharmony_ci    path.cubicTo(1, 2, 3, 4, 5, 6);
12cb93a386Sopenharmony_ci    path.conicTo(0, 0, 0, 0, 2);
13cb93a386Sopenharmony_ci    uint8_t verbs[7];
14cb93a386Sopenharmony_ci    int count = path.getVerbs(verbs, (int) SK_ARRAY_COUNT(verbs));
15cb93a386Sopenharmony_ci    const char* verbStr[] = { "Move", "Line", "Quad", "Conic", "Cubic", "Close" };
16cb93a386Sopenharmony_ci    SkDebugf("verb count: %d\nverbs: ", count);
17cb93a386Sopenharmony_ci    for (int i = 0; i < count; ++i) {
18cb93a386Sopenharmony_ci        SkDebugf("k%s_Verb ", verbStr[verbs[i]]);
19cb93a386Sopenharmony_ci    }
20cb93a386Sopenharmony_ci    SkDebugf("\n");
21cb93a386Sopenharmony_ci}
22cb93a386Sopenharmony_ci}  // END FIDDLE
23