Skia
2DGraphicsLibrary
|
Describe an image's dimensions and pixel type. More...
#include <SkImageInfo.h>
Public Member Functions | |
int | width () const |
int | height () const |
SkColorType | colorType () const |
SkAlphaType | alphaType () const |
SkColorSpace * | colorSpace () const |
sk_sp< SkColorSpace > | refColorSpace () const |
bool | isEmpty () const |
bool | isOpaque () const |
SkISize | dimensions () const |
SkIRect | bounds () const |
bool | gammaCloseToSRGB () const |
SkImageInfo | makeWH (int newWidth, int newHeight) const |
Return a new ImageInfo with the same colortype and alphatype as this info, but with the specified width and height. | |
SkImageInfo | makeAlphaType (SkAlphaType newAlphaType) const |
SkImageInfo | makeColorType (SkColorType newColorType) const |
SkImageInfo | makeColorSpace (sk_sp< SkColorSpace > cs) const |
int | bytesPerPixel () const |
int | shiftPerPixel () const |
uint64_t | minRowBytes64 () const |
size_t | minRowBytes () const |
size_t | computeOffset (int x, int y, size_t rowBytes) const |
bool | operator== (const SkImageInfo &other) const |
bool | operator!= (const SkImageInfo &other) const |
void | unflatten (SkReadBuffer &) |
void | flatten (SkWriteBuffer &) const |
int64_t | getSafeSize64 (size_t rowBytes) const |
size_t | getSafeSize (size_t rowBytes) const |
bool | validRowBytes (size_t rowBytes) const |
void | reset () |
void | validate () const |
Static Public Member Functions | |
static SkImageInfo | Make (int width, int height, SkColorType ct, SkAlphaType at, sk_sp< SkColorSpace > cs=nullptr) |
static SkImageInfo | MakeN32 (int width, int height, SkAlphaType at, sk_sp< SkColorSpace > cs=nullptr) |
Sets colortype to the native ARGB32 type. | |
static SkImageInfo | MakeS32 (int width, int height, SkAlphaType at) |
Create an ImageInfo marked as SRGB with N32 swizzle. | |
static SkImageInfo | MakeN32Premul (int width, int height, sk_sp< SkColorSpace > cs=nullptr) |
Sets colortype to the native ARGB32 type, and the alphatype to premul. | |
static SkImageInfo | MakeN32Premul (const SkISize &size) |
static SkImageInfo | MakeA8 (int width, int height) |
static SkImageInfo | MakeUnknown (int width, int height) |
static SkImageInfo | MakeUnknown () |
Private Member Functions | |
SkImageInfo (int width, int height, SkColorType ct, SkAlphaType at, sk_sp< SkColorSpace > cs) | |
Private Attributes | |
sk_sp< SkColorSpace > | fColorSpace |
int | fWidth |
int | fHeight |
SkColorType | fColorType |
SkAlphaType | fAlphaType |
Describe an image's dimensions and pixel type.
Used for both src images and render-targets (surfaces).