Debian Codegraph @

include/codec/SkPixmapUtils.h

raw
1 /*
2 * Copyright 2023 Google LLC
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 SkPixmapUtils_DEFINED
9 #define SkPixmapUtils_DEFINED
10
11 #include "include/codec/SkEncodedOrigin.h"
12 #include "include/core/SkImageInfo.h"
13 #include "include/private/base/SkAPI.h"
14
15 class SkPixmap;
16
17 namespace SkPixmapUtils {
18 /**
19 * Copy the pixels in src into dst, applying the orientation transformations specified
20 * by origin. If the inputs are invalid, this returns false and no copy is made.
21 */
22 SK_API bool Orient(const SkPixmap& dst, const SkPixmap& src, SkEncodedOrigin origin);
23
24 /**
25 * Return a copy of the provided ImageInfo with the width and height swapped.
26 */
27 SK_API SkImageInfo SwapWidthHeight(const SkImageInfo& info);
28
29 } // namespace SkPixmapUtils
30
31 #endif // SkPixmapUtils_DEFINED