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=35915a2273be1076f00f2e47998ce808 5cb93a386Sopenharmony_ciREG_FIDDLE(Dst, 256, 256, false, 3) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkRSXform xforms[] = { { .5f, 0, 0, 0 }, {0, .5f, 125, 128 } }; 8cb93a386Sopenharmony_ci SkRect tex[] = { { 0, 0, 250, 250 }, { 0, 0, 250, 250 } }; 9cb93a386Sopenharmony_ci SkColor colors[] = { 0x7f55aa00, 0x7f3333bf }; 10cb93a386Sopenharmony_ci SkSamplingOptions sampling; 11cb93a386Sopenharmony_ci canvas->drawAtlas(image.get(), xforms, tex, colors, 2, SkBlendMode::kSrc, 12cb93a386Sopenharmony_ci sampling, nullptr, nullptr); 13cb93a386Sopenharmony_ci canvas->translate(128, 0); 14cb93a386Sopenharmony_ci canvas->drawAtlas(image.get(), xforms, tex, colors, 2, SkBlendMode::kDst, 15cb93a386Sopenharmony_ci sampling, nullptr, nullptr); 16cb93a386Sopenharmony_ci} 17cb93a386Sopenharmony_ci} // END FIDDLE 18