Flutter Engine
The Flutter Engine
Classes | Functions | Variables
dashcircle.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkPathEffect.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTypes.h"
#include "include/effects/SkDashPathEffect.h"
#include "tools/timer/TimeUtils.h"

Go to the source code of this file.

Classes

struct  DashExample
 
class  DashCircleGM
 
class  DashCircle2GM
 

Functions

 DEF_SIMPLE_GM (maddash, canvas, 1600, 1600)
 

Variables

int dash1 [] = { 1, 1 }
 
int dash2 [] = { 1, 3 }
 
int dash3 [] = { 1, 1, 3, 3 }
 
int dash4 [] = { 1, 3, 2, 4 }
 
struct DashExample dashExamples []
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( maddash  ,
canvas  ,
1600  ,
1600   
)

Definition at line 239 of file dashcircle.cpp.

239 {
240 canvas->drawRect({0, 0, 1600, 1600}, SkPaint());
241 SkPaint p;
242 p.setColor(SK_ColorRED);
243 p.setAntiAlias(true);
244 p.setStroke(true);
245 p.setStrokeWidth(380);
246
247 SkScalar intvls[] = { 2.5, 10 /* 1200 */ };
248 p.setPathEffect(SkDashPathEffect::Make(intvls, 2, 0));
249
250 canvas->drawCircle(400, 400, 200, p);
251
253 path.moveTo(800, 400);
254 path.quadTo(1000, 400, 1000, 600);
255 path.quadTo(1000, 800, 800, 800);
256 path.quadTo(600, 800, 600, 600);
257 path.quadTo(600, 400, 800, 400);
258 path.close();
259 canvas->translate(350, 150);
260 p.setStrokeWidth(320);
261 canvas->drawPath(path.detach(), p);
262
263 path.moveTo(800, 400);
264 path.cubicTo(900, 400, 1000, 500, 1000, 600);
265 path.cubicTo(1000, 700, 900, 800, 800, 800);
266 path.cubicTo(700, 800, 600, 700, 600, 600);
267 path.cubicTo(600, 500, 700, 400, 800, 400);
268 path.close();
269 canvas->translate(-550, 500);
270 p.setStrokeWidth(300);
271 canvas->drawPath(path.detach(), p);
272}
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
float SkScalar
Definition: extension.cpp:12
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

Variable Documentation

◆ dash1

int dash1[] = { 1, 1 }

Definition at line 24 of file dashcircle.cpp.

◆ dash2

int dash2[] = { 1, 3 }

Definition at line 25 of file dashcircle.cpp.

◆ dash3

int dash3[] = { 1, 1, 3, 3 }

Definition at line 26 of file dashcircle.cpp.

◆ dash4

int dash4[] = { 1, 3, 2, 4 }

Definition at line 27 of file dashcircle.cpp.

◆ dashExamples

struct DashExample dashExamples[]
Initial value:
= {
}
int dash2[]
Definition: dashcircle.cpp:25
int dash3[]
Definition: dashcircle.cpp:26
int dash1[]
Definition: dashcircle.cpp:24
int dash4[]
Definition: dashcircle.cpp:27
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259