blob: 775736d14d2ecb505f74d67ca2ab1269c94921e2 [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001// 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=8dc0d0fdeab20bbc21cac6874ddbefcd
5REG_FIDDLE(Canvas_124, 256, 256, false, 3) {
6void 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