29 paint.setAntiAlias(
true);
32 return surface->makeImageSnapshot();
41 sk_sp<SkShader> redLocalMatrixShader = redImageShader->makeWithLocalMatrix(translate);
45 paint.setShader(redLocalMatrixShader);
53 paint.setShader(blueLocalMatrixShader);
56 canvas->translate(100.0f, 0.0f);
61 SkImage*
image = redLocalMatrixShader->isAImage(&matrix, mode);
64 image = blueLocalMatrixShader->isAImage(&matrix, mode);
76 ->makeWithLocalMatrix(m));
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
static sk_sp< SkImage > make_image()
static constexpr SkCubicResampler Mitchell()
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)