File: SkPixmapUtils.h

package info (click to toggle)
webkit2gtk 2.50.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 445,852 kB
  • sloc: cpp: 3,799,082; javascript: 197,876; ansic: 161,339; python: 49,141; asm: 21,987; ruby: 18,540; perl: 16,722; xml: 4,623; yacc: 2,360; sh: 2,246; java: 2,019; lex: 1,327; pascal: 366; makefile: 305
file content (31 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (37)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright 2023 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkPixmapUtils_DEFINED
#define SkPixmapUtils_DEFINED

#include "include/codec/SkEncodedOrigin.h"
#include "include/core/SkImageInfo.h"
#include "include/private/base/SkAPI.h"

class SkPixmap;

namespace SkPixmapUtils {
/**
 *  Copy the pixels in src into dst, applying the orientation transformations specified
 *  by origin. If the inputs are invalid, this returns false and no copy is made.
 */
SK_API bool Orient(const SkPixmap& dst, const SkPixmap& src, SkEncodedOrigin origin);

/**
 *  Return a copy of the provided ImageInfo with the width and height swapped.
 */
SK_API SkImageInfo SwapWidthHeight(const SkImageInfo& info);

}  // namespace SkPixmapUtils

#endif // SkPixmapUtils_DEFINED