Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 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 "fiddle/examples.h" |
| 4 | // HASH=c093c2b14bd3e6171ede7cd4049d9b57 |
Hal Canary | a7181e7c | 2019-03-18 16:06:34 -0400 | [diff] [blame] | 5 | REG_FIDDLE(Canvas_drawAtlas_4, 256, 256, false, 3) { |
Hal Canary | 8751512 | 2019-03-15 14:22:51 -0400 | [diff] [blame] | 6 | void draw(SkCanvas* canvas) { |
| 7 | // sk_sp<SkImage> image = mandrill; |
| 8 | SkRSXform xforms[] = { { 1, 0, 0, 0 }, {0, 1, 300, 100 } }; |
| 9 | SkRect tex[] = { { 0, 0, 200, 200 }, { 200, 0, 400, 200 } }; |
| 10 | canvas->drawAtlas(image, xforms, tex, 2, nullptr, nullptr); |
| 11 | } |
| 12 | } // END FIDDLE |