blob: dfc9ce2dd086d8392c88fd464dcaf2ef64cc27d5 (
plain)
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
32
33
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkPixmapPriv_DEFINED
#define SkPixmapPriv_DEFINED
#include "SkPixmap.h"
#include "SkCodec.h"
class SkPixmapPriv {
public:
// These flag are applied in this order (swap is applied last)
enum OrientFlags {
kMirrorX = 1 << 0,
kMirrorY = 1 << 1,
kSwapXY = 1 << 2,
};
static OrientFlags OriginToOrient(SkCodec::Origin);
/**
* Copy the pixels in this pixmap into dst, applying the orientation transformations specified
* by the flags. If the inputs are invalid, this returns false and no copy is made.
*/
static bool Orient(const SkPixmap& dst, const SkPixmap& src, OrientFlags);
};
#endif
|