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=10172fca71b9dbdcade772513ffeb27e 5cb93a386Sopenharmony_ciREG_FIDDLE(Image_makeShader_2, 256, 256, false, 5) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkMatrix matrix; 8cb93a386Sopenharmony_ci matrix.setRotate(45); 9cb93a386Sopenharmony_ci matrix.postTranslate(125, 30); 10cb93a386Sopenharmony_ci SkPaint paint; 11cb93a386Sopenharmony_ci paint.setShader(image->makeShader(SkSamplingOptions(), matrix)); 12cb93a386Sopenharmony_ci canvas->drawPaint(paint); 13cb93a386Sopenharmony_ci} 14cb93a386Sopenharmony_ci} // END FIDDLE 15