1cb93a386Sopenharmony_ci// Copyright 2020 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_ciREG_FIDDLE(pathmeasure, 256, 256, true, 0) {
5cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
6cb93a386Sopenharmony_ci    SkPath path;
7cb93a386Sopenharmony_ci    path.moveTo(0, 0);
8cb93a386Sopenharmony_ci    path.lineTo(1, 0);
9cb93a386Sopenharmony_ci    path.moveTo(0, 1);
10cb93a386Sopenharmony_ci    path.lineTo(1, 1);
11cb93a386Sopenharmony_ci    SkPathMeasure measure(path, false);
12cb93a386Sopenharmony_ci    SkPath result;
13cb93a386Sopenharmony_ci    measure.getSegment(.5, 1.5, &result, true);
14cb93a386Sopenharmony_ci    result.dump();
15cb93a386Sopenharmony_ci}
16cb93a386Sopenharmony_ci}  // END FIDDLE
17