OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkImage.h" | 10 #include "SkImage.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // canvas->drawText(str.c_str(), str.size(), 300, 100, paint); | 40 // canvas->drawText(str.c_str(), str.size(), 300, 100, paint); |
41 | 41 |
42 canvas->translate(20, 20); | 42 canvas->translate(20, 20); |
43 for (int i = 0; i < 4; ++i) { | 43 for (int i = 0; i < 4; ++i) { |
44 paint.setFilterQuality(SkFilterQuality(i)); | 44 paint.setFilterQuality(SkFilterQuality(i)); |
45 canvas->drawImageRect(img.get(), dst, &paint); | 45 canvas->drawImageRect(img.get(), dst, &paint); |
46 canvas->translate(0, 20); | 46 canvas->translate(0, 20); |
47 } | 47 } |
48 canvas->drawImage(img.get(), 20, 20, nullptr); | 48 canvas->drawImage(img.get(), 20, 20, nullptr); |
49 } | 49 } |
50 | |
OLD | NEW |