Flutter Engine
The Flutter Engine
Functions
radial_gradient_precision.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPoint.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkTileMode.h"
#include "include/core/SkTypes.h"
#include "include/effects/SkGradientShader.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (radial_gradient_precision, canvas, 200, 200)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( radial_gradient_precision  ,
canvas  ,
200  ,
200   
)

Definition at line 20 of file radial_gradient_precision.cpp.

20 {
21 SkPoint center = {1000, 1000};
22 SkScalar radius = 40;
24
25 SkPaint p;
26 p.setShader(SkGradientShader::MakeRadial(center, radius,
27 colors, nullptr, std::size(colors),
29 canvas->drawPaint(p);
30}
uint32_t SkColor
Definition: SkColor.h:37
constexpr SkColor SK_ColorBLACK
Definition: SkColor.h:103
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
static SkScalar center(float pos0, float pos1)
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)
float SkScalar
Definition: extension.cpp:12
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