OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #ifndef sk_tool_utils_DEFINED | 8 #ifndef sk_tool_utils_DEFINED |
9 #define sk_tool_utils_DEFINED | 9 #define sk_tool_utils_DEFINED |
10 | 10 |
11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 | 13 |
14 namespace sk_tool_utils { | 14 namespace sk_tool_utils { |
15 | 15 |
16 const char* colortype_name(SkColorType); | 16 const char* colortype_name(SkColorType); |
17 | 17 |
18 /** | 18 /** |
19 * Return the colorType and alphaType that correspond to the specified Conf
ig8888 | |
20 */ | |
21 void config8888_to_imagetypes(SkCanvas::Config8888, SkColorType*, SkAlphaTyp
e*); | |
22 | |
23 /** | |
24 * Call canvas->writePixels() by using the pixels from bitmap, but with an
info that claims | 19 * Call canvas->writePixels() by using the pixels from bitmap, but with an
info that claims |
25 * the pixels are colorType + alphaType | 20 * the pixels are colorType + alphaType |
26 */ | 21 */ |
27 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA
lphaType); | 22 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkA
lphaType); |
28 } | 23 } |
29 | 24 |
30 #endif | 25 #endif |
OLD | NEW |