Go to the source code of this file.
|
static sk_sp< SkShader > | make_linear_gradient (const SkPoint pts[2], const SkMatrix &localMatrix) |
|
static sk_sp< SkShader > | make_radial_gradient (const SkPoint pts[2], const SkMatrix &localMatrix) |
|
static void | draw_gradients (SkCanvas *canvas, sk_sp< SkShader >(*makeShader)(const SkPoint[2], const SkMatrix &), const SkPoint ptsArray[][2], int numImages) |
|
| DEF_SIMPLE_GM_BG (gradient_matrix, canvas, 800, 800, 0xFFDDDDDD) |
|
◆ DEF_SIMPLE_GM_BG()
DEF_SIMPLE_GM_BG |
( |
gradient_matrix |
, |
|
|
canvas |
, |
|
|
800 |
, |
|
|
800 |
, |
|
|
0xFFDDDDDD |
|
|
) |
| |
Definition at line 111 of file gradient_matrix.cpp.
111 {
114
116
119}
constexpr SkPoint linearPts[][2]
constexpr SkPoint radialPts[][2]
constexpr SkScalar TESTGRID_Y
static sk_sp< SkShader > make_linear_gradient(const SkPoint pts[2], const SkMatrix &localMatrix)
static void draw_gradients(SkCanvas *canvas, sk_sp< SkShader >(*makeShader)(const SkPoint[2], const SkMatrix &), const SkPoint ptsArray[][2], int numImages)
static sk_sp< SkShader > make_radial_gradient(const SkPoint pts[2], const SkMatrix &localMatrix)
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
◆ draw_gradients()
Definition at line 78 of file gradient_matrix.cpp.
80 {
81
82
83
90
92 for (
int i = 0;
i < numImages;
i++) {
93
98 }
99
101 paint.setShader(makeShader(*ptsArray, shaderMat));
103
104
106 ptsArray++;
107 }
109}
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
constexpr SkScalar TESTGRID_X
constexpr float left() const
constexpr float top() const
constexpr float height() const
constexpr float width() const
◆ make_linear_gradient()
Definition at line 64 of file gradient_matrix.cpp.
64 {
67}
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
constexpr SkColor gColors[]
◆ make_radial_gradient()
Definition at line 69 of file gradient_matrix.cpp.
69 {
76}
#define SkScalarAve(a, b)
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
◆ gColors
Initial value:= {
}
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorRED
Definition at line 22 of file gradient_matrix.cpp.
◆ IMAGES_X
constexpr int IMAGES_X = 4 |
|
constexpr |
◆ linearPts
◆ radialPts
◆ sHalf
◆ sOne
◆ sZero
◆ TESTGRID_X
◆ TESTGRID_Y