Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
UnicornPoop.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (UnicornPoop, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( UnicornPoop  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file UnicornPoop.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 p.setAntiAlias(true);
9 p.setStrokeWidth(10);
10
11 for (int r = 0; r <= 255; r += 10) {
12 for (int g = 0; g <= 255; g += 10) {
13 for (int b = 0; b <= 255; b += 10) {
14 p.setColor(SkColorSetRGB(r, g, b));
15 canvas->drawRect(SkRect::MakeXYWH(r, g, b, 1), p);
16 }
17 }
18 }
19}
20} // END FIDDLE
#define SkColorSetRGB(r, g, b)
Definition SkColor.h:57
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawRect(const SkRect &rect, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
static bool b
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
Definition SkRect.h:659