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

Go to the source code of this file.

Functions

 REG_FIDDLE (Shader_Methods_a, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Shader_Methods_a  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Shader_Methods_a.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 SkPoint center = { 50, 50 };
8 SkScalar radius = 50;
9 const SkColor colors[] = { 0xFFFFFFFF, 0xFF000000 };
12 for (SkScalar a : { 0.3f, 0.6f, 1.0f } ) {
13 paint.setAlpha((int) (a * 255));
14 canvas->drawCircle(center.fX, center.fY, radius, paint);
15 canvas->translate(70, 70);
16 }
17}
18} // END FIDDLE
uint32_t SkColor
Definition: SkColor.h:37
static SkScalar center(float pos0, float pos1)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
Definition: SkCanvas.cpp:2707
static sk_sp< SkShader > MakeRadial(const SkPoint &center, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
const Paint & paint
Definition: color_source.cc:38
float SkScalar
Definition: extension.cpp:12
struct MyStruct a[10]
PODArray< SkColor > colors
Definition: SkRecords.h:276
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