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=c204b38b3fc08914b0a634aa4eaec894 5cb93a386Sopenharmony_ciREG_FIDDLE(Image_bounds, 256, 128, false, 4) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkIRect bounds = image->bounds(); 8cb93a386Sopenharmony_ci for (int x : { 0, bounds.width() } ) { 9cb93a386Sopenharmony_ci for (int y : { 0, bounds.height() } ) { 10cb93a386Sopenharmony_ci canvas->drawImage(image, x, y); 11cb93a386Sopenharmony_ci } 12cb93a386Sopenharmony_ci } 13cb93a386Sopenharmony_ci} 14cb93a386Sopenharmony_ci} // END FIDDLE 15