26 auto clipShader = clipSurface->makeImageSnapshot()->makeShader(
29 canvas->translate(5, 0);
30 for (
auto tx : {0.f, 68.5f}) {
31 for (
auto ty : {0.f, 66.5f}) {
34 canvas->translate(tx, ty);
35 canvas->clipShader(clipShader);
36 canvas->translate(-tx, -ty);
39 m.setSkew(0.03f, 0.f);
40 m.setPerspY( 0.0007f);
42 m.setScaleX(1.2f); m.setScaleY(0.8f);
62 paint.setShader(std::move(gradient));
63 canvas->drawPaint(
paint);
#define SkAssertResult(cond)
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorGREEN
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)
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeA8(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)