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

Go to the source code of this file.

Functions

 REG_FIDDLE (Path_addRoundRect, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Path_addRoundRect  ,
256  ,
256  ,
false  ,
 
)

Definition at line 5 of file Path_addRoundRect.cpp.

5 {
6void draw(SkCanvas* canvas) {
8 paint.setAntiAlias(true);
9 for (auto xradius : { 0, 7, 13, 20 } ) {
10 for (auto yradius : { 0, 9, 18, 40 } ) {
12 path.addRoundRect({10, 10, 36, 46}, xradius, yradius);
13 paint.setColor(path.isRect(nullptr) ? SK_ColorRED : path.isOval(nullptr) ?
15 canvas->drawPath(path, paint);
16 canvas->translate(64, 0);
17 }
18 canvas->translate(-256, 64);
19 }
20}
21} // END FIDDLE
constexpr SkColor SK_ColorGRAY
Definition SkColor.h:113
constexpr SkColor SK_ColorBLUE
Definition SkColor.h:135
constexpr SkColor SK_ColorRED
Definition SkColor.h:126
constexpr SkColor SK_ColorGREEN
Definition SkColor.h:131
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
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