Flutter Engine
The Flutter Engine
Functions
SkParsePath_ToSVGString.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (SkParsePath_ToSVGString, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( SkParsePath_ToSVGString  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file SkParsePath_ToSVGString.cpp.

4 {
5SkPath star() {
6 const SkScalar R = 115.2f, C = 128.0f;
9 for (int i = 1; i < 8; ++i) {
10 SkScalar a = 2.6927937f * i;
11 path.lineTo(sk_float_round(C + R * cos(a)), sk_float_round(C + R * sin(a)));
12 }
13 return path;
14}
15
16void draw(SkCanvas* canvas) {
17 SkDebugf("%s\n", SkParsePath::ToSVGString(star()).c_str());
18}
19} // END FIDDLE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
#define sk_float_round(x)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
static SkString ToSVGString(const SkPath &, PathEncoding=PathEncoding::Absolute)
Definition: SkPath.h:59
float SkScalar
Definition: extension.cpp:12
struct MyStruct a[10]
#define R(r)
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