nux-0.9.48
|
Image Surface class. More...
#include <NuxImage/ImageSurface.h>
Public Member Functions | |
ImageSurface () | |
~ImageSurface () | |
ImageSurface (BitmapFormat format, t_u32 width, t_u32 height) | |
ImageSurface (const ImageSurface &) | |
ImageSurface & | operator= (const ImageSurface &) |
bool | IsNull () const |
t_s32 | GetWidth () const |
t_s32 | GetHeight () const |
void | Allocate (BitmapFormat format, t_s32 width, t_s32 height) |
void | Write32b (t_s32 i, t_s32 j, t_u32 value) |
void | Write24b (t_s32 i, t_s32 j, t_u32 value) |
void | Write16b (t_s32 i, t_s32 j, t_u16 value) |
void | Write8b (t_s32 i, t_s32 j, t_u8 value) |
void | Write (t_s32 i, t_s32 j, t_u8 r, t_u8 g, t_u8 b, t_u8 a) |
t_u32 | Read (t_s32 i, t_s32 j) |
Read an element of the surface. | |
void | Clear () |
Set all surface elements to 0. | |
void | FlipHorizontal () |
Flip the surface horizontally. | |
void | FlipVertical () |
Flip the surface vertically. | |
t_s32 | GetPitch () const |
Returns the surface pitch. | |
t_s32 | GetBlockHeight () const |
t_s32 | GetAlignment () const |
t_s32 | GetSize () const |
BitmapFormat | GetFormat () const |
const t_u8 * | GetPtrRawData () const |
t_u8 * | GetPtrRawData () |
Color | AverageColor () |
Compute the average color of the image surface. | |
void | GaussianBlur (int radius) |
Static Public Member Functions | |
static t_s32 | GetLevelPitch (BitmapFormat format, t_s32 width, t_s32 height, t_s32 miplevel) |
static t_s32 | GetLevelPitchNoMemAlignment (BitmapFormat format, t_s32 width, t_s32 height, t_s32 miplevel) |
static t_s32 | GetLevelSize (BitmapFormat format, t_s32 width, t_s32 height, t_s32 miplevel) |
static t_s32 | GetLevelSize (BitmapFormat format, t_s32 width, t_s32 height, t_s32 depth, t_s32 miplevel) |
static t_s32 | GetLevelWidth (BitmapFormat format, t_s32 width, t_s32 miplevel) |
static t_s32 | GetLevelHeight (BitmapFormat format, t_s32 height, t_s32 miplevel) |
static t_s32 | GetLevelDim (BitmapFormat format, t_s32 length, t_s32 miplevel) |
static t_s32 | GetNumMipLevel (BitmapFormat format, t_s32 width, t_s32 height) |
static t_s32 | GetMemAlignment (BitmapFormat format) |
static t_s32 | GetLevelBlockWidth (BitmapFormat format, t_s32 width, t_s32 miplevel) |
static t_s32 | GetLevelBlockHeight (BitmapFormat format, t_s32 height, t_s32 miplevel) |
Image Surface class.
Represent and image surface inside a complex data structure such as a 2D texture, Volume texture or Cube map.
nux::ImageSurface::ImageSurface | ( | ) |
nux::ImageSurface::~ImageSurface | ( | ) |
nux::ImageSurface::ImageSurface | ( | BitmapFormat | format, |
t_u32 | width, | ||
t_u32 | height | ||
) |
nux::ImageSurface::ImageSurface | ( | const ImageSurface & | ) |
void nux::ImageSurface::Allocate | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height | ||
) |
Color nux::ImageSurface::AverageColor | ( | ) |
Compute the average color of the image surface.
Sum up all the image elements and divide by the number of elements.
void nux::ImageSurface::Clear | ( | ) |
Set all surface elements to 0.
void nux::ImageSurface::FlipHorizontal | ( | ) |
Flip the surface horizontally.
void nux::ImageSurface::FlipVertical | ( | ) |
Flip the surface vertically.
void nux::ImageSurface::GaussianBlur | ( | int | radius | ) |
t_s32 nux::ImageSurface::GetAlignment | ( | ) | const |
t_s32 nux::ImageSurface::GetBlockHeight | ( | ) | const |
BitmapFormat nux::ImageSurface::GetFormat | ( | ) | const |
t_s32 nux::ImageSurface::GetHeight | ( | ) | const [inline] |
static t_s32 nux::ImageSurface::GetLevelBlockHeight | ( | BitmapFormat | format, |
t_s32 | height, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelBlockWidth | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelDim | ( | BitmapFormat | format, |
t_s32 | length, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelHeight | ( | BitmapFormat | format, |
t_s32 | height, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelPitch | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelPitchNoMemAlignment | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelSize | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelSize | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height, | ||
t_s32 | depth, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetLevelWidth | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | miplevel | ||
) | [static] |
static t_s32 nux::ImageSurface::GetMemAlignment | ( | BitmapFormat | format | ) | [static] |
static t_s32 nux::ImageSurface::GetNumMipLevel | ( | BitmapFormat | format, |
t_s32 | width, | ||
t_s32 | height | ||
) | [static] |
t_s32 nux::ImageSurface::GetPitch | ( | ) | const |
Returns the surface pitch.
t_u8* nux::ImageSurface::GetPtrRawData | ( | ) |
const t_u8* nux::ImageSurface::GetPtrRawData | ( | ) | const |
t_s32 nux::ImageSurface::GetSize | ( | ) | const |
t_s32 nux::ImageSurface::GetWidth | ( | ) | const [inline] |
bool nux::ImageSurface::IsNull | ( | ) | const |
ImageSurface& nux::ImageSurface::operator= | ( | const ImageSurface & | ) |
Read an element of the surface.
Return a 32 bits value representing the image element at coordinates (i, j). For the RGBA format, the LSB of the returned value represent the read value, and the MSB represents the alpha value. | LSB: Red | Green | Blue | MSB: Alpha|