blob: 326672d0052b802db9dad45430612cb3a1440ff2 [file] [log] [blame]
Hal Canary6c8422c2020-01-10 15:22:09 -05001// Copyright 2020 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"
4REG_FIDDLE(skbug_633528, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
6 static const char imageData[] =
7 "\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\202\0\0\0\202\2\3\0\0\0\367m\370"
8 "n\0\0\0\tPLTE\0\1\0\0\377\377\375\377\374\301\233\213\345\0\0\0\tp"
9 "HYs\0\0\13\23\0\0\13\23\1\0\232\234\30\0\0\0\7tIME\7\340\10\2\22\2"
10 " V\23\7<\0\0\0\341IDATX\303\205\3301a\3\1\20\3\301'\21\10)\34\24&\21"
11 "h\202\240B\207\322\14<[\17\202}\36\366\363\377\275\367\363K\361\242"
12 "\370\263\10E)Fq\26\241(\305(\316\"\24\245\30\305Y\204\242\24\2438\213"
13 "P\224b\24g\21\212R\214\342,BQ\212Q\234E(J1\212\263\10E)Fq\26\241(\305"
14 "(\316\"\24\245\30\305Y\204\242\24\2438\213P\224b\24g\21\212R\214\342"
15 ",BQ\212Q\234E(J1\212\263\10E)Fq\26\241(\305(\316\"\24\245\30\305Y\204"
16 "\242\24\2438\213P\224b\24g\21\212R\214\342,BQ\212Q\234E(J1\212\263"
17 "\10E)Fq\26\241(\305(\316\"\24\245\30\305Y\204\242\24\2438\213P\224"
18 "b\24g\21\212R\214\342,BQ\212Q\334\333\203\344\3v\211\352J5\271\206"
19 "*\0\0\0\0IEND\256B`\202";
20 auto i = SkImage::MakeFromEncoded(SkData::MakeWithoutCopy(imageData, 343));
21 canvas->scale(0.99f, 1.01f);
22 canvas->clipRect(SkRect::MakeXYWH(64, 64, 128, 128));
23 canvas->drawImage(i, 63, 63);
24}
25} // END FIDDLE