arsa
2.7
|
Interface for software image data. More...
#include <IImage.h>
Public Member Functions | |
IImage (ECOLOR_FORMAT format, const core::dimension2d< u32 > &size, bool deleteMemory) | |
constructor More... | |
virtual | ~IImage () |
destructor More... | |
ECOLOR_FORMAT | getColorFormat () const |
Returns the color format. More... | |
const core::dimension2d< u32 > & | getDimension () const |
Returns width and height of image data. More... | |
u32 | getBitsPerPixel () const |
Returns bits per pixel. More... | |
u32 | getBytesPerPixel () const |
Returns bytes per pixel. More... | |
u32 | getImageDataSizeInBytes () const |
Returns image data size in bytes. More... | |
u32 | getImageDataSizeInPixels () const |
Returns image data size in pixels. More... | |
u32 | getPitch () const |
Returns pitch of image. More... | |
u32 | getRedMask () const |
Returns mask for red value of a pixel. More... | |
u32 | getGreenMask () const |
Returns mask for green value of a pixel. More... | |
u32 | getBlueMask () const |
Returns mask for blue value of a pixel. More... | |
u32 | getAlphaMask () const |
Returns mask for alpha value of a pixel. More... | |
void * | getData () const |
Use this to get a pointer to the image data. More... | |
_IRR_DEPRECATED_ void * | lock () |
Lock function. Use this to get a pointer to the image data. More... | |
_IRR_DEPRECATED_ void | unlock () |
Unlock function. More... | |
core::dimension2du | getMipMapsSize (u32 mipmapLevel) const |
Get the mipmap size for this image for a certain mipmap level. More... | |
void * | getMipMapsData (irr::u32 mipLevel=1) const |
Get mipmaps data. More... | |
void | setMipMapsData (void *data, bool ownForeignMemory, bool deleteMemory) |
Set mipmaps data. More... | |
virtual SColor | getPixel (u32 x, u32 y) const =0 |
Returns a pixel. More... | |
virtual void | setPixel (u32 x, u32 y, const SColor &color, bool blend=false)=0 |
Sets a pixel. More... | |
virtual void | copyToScaling (void *target, u32 width, u32 height, ECOLOR_FORMAT format=ECF_A8R8G8B8, u32 pitch=0)=0 |
Copies the image into the target, scaling the image to fit. More... | |
virtual void | copyToScaling (IImage *target)=0 |
Copies the image into the target, scaling the image to fit. More... | |
virtual void | copyTo (IImage *target, const core::position2d< s32 > &pos=core::position2d< s32 >(0, 0))=0 |
copies this surface into another More... | |
virtual void | copyTo (IImage *target, const core::position2d< s32 > &pos, const core::rect< s32 > &sourceRect, const core::rect< s32 > *clipRect=0)=0 |
copies this surface into another More... | |
virtual void | copyToWithAlpha (IImage *target, const core::position2d< s32 > &pos, const core::rect< s32 > &sourceRect, const SColor &color, const core::rect< s32 > *clipRect=0, bool combineAlpha=false)=0 |
copies this surface into another, using the alpha mask and cliprect and a color to add with More... | |
virtual void | copyToScalingBoxFilter (IImage *target, s32 bias=0, bool blend=false)=0 |
copies this surface into another, scaling it to fit, applying a box filter More... | |
virtual void | fill (const SColor &color)=0 |
fills the surface with given color More... | |
_IRR_DEPRECATED_ bool | isCompressed () const |
Inform whether the image is compressed. More... | |
_IRR_DEPRECATED_ bool | hasMipMaps () const |
Check whether the image has MipMaps. More... | |
Public Member Functions inherited from irr::IReferenceCounted | |
IReferenceCounted () | |
Constructor. More... | |
virtual | ~IReferenceCounted () |
Destructor. More... | |
void | grab () const |
Grabs the object. Increments the reference counter by one. More... | |
bool | drop () const |
Drops the object. Decrements the reference counter by one. More... | |
s32 | getReferenceCount () const |
Get the reference count. More... | |
const c8 * | getDebugName () const |
Returns the debug name of the object. More... | |
Static Public Member Functions | |
static core::dimension2du | getMipMapsSize (const core::dimension2du &sizeLevel0, u32 mipmapLevel) |
Calculate mipmap size for a certain level. More... | |
static u32 | getBitsPerPixelFromFormat (const ECOLOR_FORMAT format) |
get the amount of Bits per Pixel of the given color format More... | |
static u32 | getDataSizeFromFormat (ECOLOR_FORMAT format, u32 width, u32 height) |
calculate image data size in bytes for selected format, width and height. More... | |
static bool | isCompressedFormat (const ECOLOR_FORMAT format) |
check if this is compressed color format More... | |
static bool | isDepthFormat (const ECOLOR_FORMAT format) |
check if the color format is only viable for depth/stencil textures More... | |
static bool | isFloatingPointFormat (const ECOLOR_FORMAT format) |
Check if the color format uses floating point values for pixels. More... | |
Protected Attributes | |
ECOLOR_FORMAT | Format |
core::dimension2d< u32 > | Size |
u8 * | Data |
u8 * | MipMapsData |
u32 | BytesPerPixel |
u32 | Pitch |
bool | DeleteMemory |
bool | DeleteMipMapsMemory |
core::irrAllocator< u8 > | Allocator |
Additional Inherited Members | |
Protected Member Functions inherited from irr::IReferenceCounted | |
void | setDebugName (const c8 *newName) |
Sets the debug name of the object. More... | |
Interface for software image data.
Image loaders create these images from files. IVideoDrivers convert these images into their (hardware) textures. NOTE: Floating point formats are not well supported yet. Basically only getData() works for them.
|
inline |
constructor
Definition at line 30 of file IImage.h.
|
inlinevirtual |
destructor
Definition at line 38 of file IImage.h.
|
pure virtual |
copies this surface into another
NOTE: mipmaps are ignored
|
pure virtual |
copies this surface into another
NOTE: mipmaps are ignored
|
pure virtual |
Copies the image into the target, scaling the image to fit.
NOTE: mipmaps are ignored
Copies the image into the target, scaling the image to fit.
NOTE: mipmaps are ignored
|
pure virtual |
copies this surface into another, scaling it to fit, applying a box filter
NOTE: mipmaps are ignored
|
pure virtual |
copies this surface into another, using the alpha mask and cliprect and a color to add with
NOTE: mipmaps are ignored
combineAlpha | - When true then combine alpha channels. When false replace target image alpha with source image alpha. |
fills the surface with given color
|
inline |
Returns mask for alpha value of a pixel.
Definition at line 145 of file IImage.h.
|
inline |
Returns bits per pixel.
Definition at line 60 of file IImage.h.
|
inlinestatic |
get the amount of Bits per Pixel of the given color format
Definition at line 364 of file IImage.h.
|
inline |
Returns mask for blue value of a pixel.
Definition at line 127 of file IImage.h.
|
inline |
|
inline |
Returns the color format.
|
inline |
Use this to get a pointer to the image data.
|
inlinestatic |
calculate image data size in bytes for selected format, width and height.
Definition at line 430 of file IImage.h.
|
inline |
|
inline |
Returns mask for green value of a pixel.
Definition at line 109 of file IImage.h.
|
inline |
Returns image data size in bytes.
Definition at line 73 of file IImage.h.
|
inline |
Get mipmaps data.
Note that different mip levels are just behind each other in memory block. So if you just get level 1 you also have the data for all other levels. There is no level 0 - use getData to get the original image data.
Definition at line 225 of file IImage.h.
|
inline |
Get the mipmap size for this image for a certain mipmap level.
level 0 will be full image size. Every further level is half the size. Doesn't care if the image actually has mipmaps, just which size would be needed.
Definition at line 193 of file IImage.h.
|
inlinestatic |
Calculate mipmap size for a certain level.
level 0 will be full image size. Every further level is half the size.
Definition at line 201 of file IImage.h.
|
inline |
Returns pitch of image.
|
inline |
Returns mask for red value of a pixel.
Definition at line 91 of file IImage.h.
|
inline |
Check whether the image has MipMaps.
Definition at line 358 of file IImage.h.
|
inline |
Inform whether the image is compressed.
Definition at line 351 of file IImage.h.
|
inlinestatic |
|
inlinestatic |
check if the color format is only viable for depth/stencil textures
Definition at line 499 of file IImage.h.
|
inlinestatic |
Check if the color format uses floating point values for pixels.
Definition at line 513 of file IImage.h.
|
inline |
Lock function. Use this to get a pointer to the image data.
Use getData instead.
Definition at line 178 of file IImage.h.
|
inline |
Set mipmaps data.
This method allows you to put custom mipmaps data for image.
data | A byte array with pixel color information |
ownForeignMemory | If true, the image will use the data pointer directly and own it afterward. If false, the memory will by copied internally. |
deleteMemory | Whether the memory is deallocated upon destruction. |
Definition at line 263 of file IImage.h.
|
pure virtual |
Sets a pixel.
|
inline |
|
protected |
|
protected |
|
protected |