39 for (
size_t i = 0; i < std::size(kColors); ++i) {
42 shaderColors[1] = kColors[i];
76 canvas->scale(7.0f, 120.0f);
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
constexpr SkAlpha SK_AlphaTRANSPARENT
void eraseArea(const SkIRect &area, SkColor c) const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawPaint(const SkPaint &paint)
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)
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static void make_transparency(SkCanvas *canvas, SkScalar width, SkScalar height)
static sk_sp< SkShader > create_checkerboard_shader(SkColor c1, SkColor c2, int size)
static void checkerboard(SkCanvas *canvas, SkColor c1, SkColor c2, int size)