7REG_FIDDLE(sweep_gradient_talk_lots, 256, 256,
false, 0) {
9 std::default_random_engine rng;
10 const auto randOpaqueColor = [&rng]() ->
SkColor {
11 return std::uniform_int_distribution<uint32_t>(0, 0xFFFFFF)(rng) | 0xFF000000;
15 color = randOpaqueColor();
17 float cx = 128, cy = 128;
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
REG_FIDDLE(sweep_gradient_talk_lots, 256, 256, false, 0)