Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkParsePath_FromSVGString.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (SkParsePath_FromSVGString, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( SkParsePath_FromSVGString  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file SkParsePath_FromSVGString.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 const char pathString[] =
7 "M 243 128 "
8 "L 24 178 "
9 "L 200 38 "
10 "L 102 240 "
11 "L 102 16 "
12 "L 200 218 "
13 "L 24 78 "
14 "Z";
16 SkParsePath::FromSVGString(pathString, &path);
18 paint.setAntiAlias(true);
20 paint.setStrokeCap(SkPaint::kRound_Cap);
21 paint.setStrokeWidth(2);
22 canvas->drawPath(path, paint);
23}
24} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawPath(const SkPath &path, const SkPaint &paint)
@ kRound_Cap
adds circle
Definition SkPaint.h:335
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
static bool FromSVGString(const char str[], SkPath *)
const Paint & paint
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