blob: 2bd42b607668be23ea8378b323e195bb932285cd [file] [log] [blame]
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +00001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef sk_tool_utils_DEFINED
9#define sk_tool_utils_DEFINED
10
tfarina20108912014-06-21 10:54:17 -070011#include "SkImageInfo.h"
12
13class SkBitmap;
14class SkCanvas;
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +000015
16namespace sk_tool_utils {
skia.committer@gmail.comdb0c8752014-03-18 03:02:11 +000017
commit-bot@chromium.orga713f9c2014-03-17 21:31:26 +000018 const char* colortype_name(SkColorType);
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +000019
20 /**
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +000021 * Call canvas->writePixels() by using the pixels from bitmap, but with an info that claims
22 * the pixels are colorType + alphaType
23 */
24 void write_pixels(SkCanvas*, const SkBitmap&, int x, int y, SkColorType, SkAlphaType);
commit-bot@chromium.org4cd9e212014-03-07 03:25:16 +000025
tfarina20108912014-06-21 10:54:17 -070026} // namespace sk_tool_utils
27
28#endif // sk_tool_utils_DEFINED