27 bool fFrontFace =
false;
38 "images/mandrill_512_q075.jpg",
53 canvas->
clear(0xFFDDDDDD);
54 if (fShaders.
size() > 0) {
55 canvas->
translate(fSize.width()/2, fSize.height()/2);
63 if (frontFace != fFrontFace) {
64 fFrontFace = frontFace;
65 fShaderIndex = (fShaderIndex + 1) % fShaders.
size();
69 paint.setAntiAlias(
true);
70 paint.setShader(fShaders[fShaderIndex]);
71 SkRect r = { -150, -150, 150, 150 };
78 bool animate(
double nanos)
override {
static SkString resource(SkPDFResourceType type, int index)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void applyToCanvas(SkCanvas *) const
SkScalar dotWithNormal(SkScalar dx, SkScalar dy, SkScalar dz) const
void rotateX(SkScalar deg)
void rotateY(SkScalar deg)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void drawRoundRect(const SkRect &rect, SkScalar rx, SkScalar ry, const SkPaint &paint)
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
virtual void resize(SkScalar winWidth, SkScalar winHeight)
virtual bool animate(double nanos)
static float Scaled(float time, float speed, float period=0)