1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC.
2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h"
4cb93a386Sopenharmony_ci// HASH=3e9126152ff1cc592aef6facbcb5fc96
5cb93a386Sopenharmony_ciREG_FIDDLE(Bitmap_bounds, 256, 64, false, 4) {
6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
7cb93a386Sopenharmony_ci    canvas->scale(.5f, .5f);
8cb93a386Sopenharmony_ci    SkIRect bounds = source.bounds();
9cb93a386Sopenharmony_ci    for (int x : { 0, bounds.width() } ) {
10cb93a386Sopenharmony_ci        for (int y : { 0, bounds.height() } ) {
11cb93a386Sopenharmony_ci            canvas->drawImage(source.asImage(), x, y);
12cb93a386Sopenharmony_ci        }
13cb93a386Sopenharmony_ci    }
14cb93a386Sopenharmony_ci}
15cb93a386Sopenharmony_ci}  // END FIDDLE
16