1 // Copyright 2019 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 #include "tools/fiddle/examples.h"
4 // HASH=8dc0d0fdeab20bbc21cac6874ddbefcd
5 REG_FIDDLE(Canvas_drawAtlas_3, 256, 256, false, 3) {
draw(SkCanvas * canvas)6 void draw(SkCanvas* canvas) {
7 // sk_sp<SkImage> image = mandrill;
8 SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 200, 100 } };
9 SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } };
10 const SkImage* imagePtr = image.get();
11 canvas->drawAtlas(imagePtr, xforms, tex, 2, nullptr, nullptr);
12 }
13 } // END FIDDLE
14