#include "tools/fiddle/examples.h"
#include <random>
Go to the source code of this file.
|
| REG_FIDDLE (sweep_gradient_talk_lots, 256, 256, false, 0) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
sweep_gradient_talk_lots |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
0 |
|
|
) |
| |
Definition at line 7 of file sweep_gradient_talk_lots.cpp.
7 {
9 std::default_random_engine rng;
10 const auto randOpaqueColor = [&rng]() ->
SkColor {
11 return std::uniform_int_distribution<uint32_t>(0, 0xFFFFFF)(rng) | 0xFF000000;
12 };
15 color = randOpaqueColor();
16 }
17 float cx = 128, cy = 128;
21}
22}
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPaint(const SkPaint &paint)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
PODArray< SkColor > colors