1 // 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 "tools/fiddle/examples.h"
4 // HASH=a4e877e891b1be5faa2b7fd07f673a10
5 REG_FIDDLE(Canvas_drawImage_2, 256, 64, false, 4) {
draw(SkCanvas * canvas)6 void draw(SkCanvas* canvas) {
7 // sk_sp<SkImage> image;
8 canvas->drawImage(image, 0, 0);
9 SkPaint paint;
10 canvas->drawImage(image, 80, 0, SkSamplingOptions(), &paint);
11 paint.setAlpha(0x80);
12 canvas->drawImage(image, 160, 0, SkSamplingOptions(), &paint);
13 }
14 } // END FIDDLE
15