5 #ifndef __I_IMAGE_H_INCLUDED__ 6 #define __I_IMAGE_H_INCLUDED__ 205 while (i != mipmapLevel)
213 if (
result.Width == 1 &&
result.Height == 1 && i < mipmapLevel )
233 while (i != mipLevel)
235 if (mipSize.
Width > 1)
244 if ( mipSize.
Width == 1 && mipSize.
Height == 1 && i < mipLevel)
276 if (ownForeignMemory)
328 virtual void copyTo(
IImage*
target,
const core::position2d<s32>& pos=core::position2d<s32>(0,0)) =0;
341 bool combineAlpha=
false) =0;
_IRR_DEPRECATED_ bool isCompressed() const
Inform whether the image is compressed.
u32 getBytesPerPixel() const
Returns bytes per pixel.
dimension2d< u32 > dimension2du
Typedef for an unsigned integer dimension.
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
get the amount of Bits per Pixel of the given color format
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
16 bit format using 16 bits for depth.
64 bit format using 32 bits for the red and green channels.
virtual SColor getPixel(u32 x, u32 y) const =0
Returns a pixel.
GLint GLint GLsizei width
64 bit format using 16 bits for the red, green, blue and alpha channels.
32 bit format using 32 bits for the red channel.
const core::dimension2d< u32 > & getDimension() const
Returns width and height of image data.
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
core::irrAllocator< u8 > Allocator
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
u32 getPitch() const
Returns pitch of image.
u32 getAlphaMask() const
Returns mask for alpha value of a pixel.
virtual void fill(const SColor &color)=0
fills the surface with given color
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
u32 getRedMask() const
Returns mask for red value of a pixel.
Everything in the Irrlicht Engine can be found in this namespace.
16 bit format using 16 bits for the red channel.
REALINLINE s32 ceil32(f32 x)
32 bit format using 24 bits for depth and 8 bits for stencil.
Interface for software image data.
virtual void copyTo(IImage *target, const core::position2d< s32 > &pos=core::position2d< s32 >(0, 0))=0
copies this surface into another
unsigned char u8
8 bit unsigned variable.
u32 getGreenMask() const
Returns mask for green value of a pixel.
static bool isFloatingPointFormat(const ECOLOR_FORMAT format)
Check if the color format uses floating point values for pixels.
_IRR_DEPRECATED_ void * lock()
Lock function. Use this to get a pointer to the image data.
_IRR_DEPRECATED_ void unlock()
Unlock function.
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
signed int s32
32 bit signed variable.
128 bit format using 32 bits for the red, green, blue and alpha channels.
unsigned int u32
32 bit unsigned variable.
16 bit color format used by the software driver.
8 bit format using 8 bits for the red channel.
T * allocate(size_t cnt)
Allocate memory for an array of objects.
_IRR_DEPRECATED_ bool hasMipMaps() const
Check whether the image has MipMaps.
GLint GLint GLint GLint GLint GLint y
core::dimension2du getMipMapsSize(u32 mipmapLevel) const
Get the mipmap size for this image for a certain mipmap level.
void * getData() const
Use this to get a pointer to the image data.
T Width
Width of the dimension.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
u32 getBitsPerPixel() const
Returns bits per pixel.
ECOLOR_FORMAT getColorFormat() const
Returns the color format.
16 bit format using 16 bits for the red channel.
Class representing a 32 bit ARGB color.
IImage(ECOLOR_FORMAT format, const core::dimension2d< u32 > &size, bool deleteMemory)
constructor
virtual ~IImage()
destructor
32 bit format using 16 bits for the red and green channels.
u32 getImageDataSizeInPixels() const
Returns image data size in pixels.
core::dimension2d< u32 > Size
static u32 getDataSizeFromFormat(ECOLOR_FORMAT format, u32 width, u32 height)
calculate image data size in bytes for selected format, width and height.
GLint GLint GLint GLint GLint x
u32 getImageDataSizeInBytes() const
Returns image data size in bytes.
Standard 16 bit color format.
void setMipMapsData(void *data, bool ownForeignMemory, bool deleteMemory)
Set mipmaps data.
Base class of most objects of the Irrlicht Engine.
static bool isDepthFormat(const ECOLOR_FORMAT format)
check if the color format is only viable for depth/stencil textures
static core::dimension2du getMipMapsSize(const core::dimension2du &sizeLevel0, u32 mipmapLevel)
Calculate mipmap size for a certain level.
T Height
Height of the dimension.
u32 getBlueMask() const
Returns mask for blue value of a pixel.
void deallocate(T *ptr)
Deallocate memory for an array of objects.
virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend=false)=0
Sets a pixel.
32 bit format using 32 bits for depth.
32 bit format using 16 bits for the red and green channels.
16 bit format using 8 bits for the red and green channels.
GLint GLint GLsizei GLsizei height
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.
static bool isCompressedFormat(const ECOLOR_FORMAT format)
check if this is compressed color format
void * getMipMapsData(irr::u32 mipLevel=1) const
Get mipmaps data.