Flutter Engine
The Flutter Engine
Conic_Weight_a.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(Conic_Weight_a, 256, 256, true, 0) {
5void draw(SkCanvas* canvas) {
6 const char* verbNames[] = { "move", "line", "quad", "conic", "cubic", "close", "done" };
7 const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };
9 path.conicTo(20, 30, 50, 60, 1);
10 SkPath::Iter iter(path, false);
11 SkPath::Verb verb;
12 do {
13 SkPoint points[4];
14 verb = iter.next(points);
15 SkDebugf("%s ", verbNames[(int) verb]);
16 for (int i = 0; i < pointCount[(int) verb]; ++i) {
17 SkDebugf("{%g, %g}, ", points[i].fX, points[i].fY);
18 }
19 if (SkPath::kConic_Verb == verb) {
20 SkDebugf("weight = %g", iter.conicWeight());
21 }
22 SkDebugf("\n");
23 } while (SkPath::kDone_Verb != verb);
24}
25} // END FIDDLE
REG_FIDDLE(Conic_Weight_a, 256, 256, true, 0)
static const int points[]
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
Verb next(SkPoint pts[4])
Definition: SkPath.cpp:1901
SkScalar conicWeight() const
Definition: SkPath.h:1535
Definition: SkPath.h:59
@ kConic_Verb
Definition: SkPath.h:1469
@ kDone_Verb
Definition: SkPath.h:1472
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57