5#ifndef __I_IMAGE_H_INCLUDED__
6#define __I_IMAGE_H_INCLUDED__
Base class of most objects of the Irrlicht Engine.
Axis aligned bounding box in 3d dimensional space.
Interface for software image data.
virtual void fill(const SColor &color)=0
fills the surface with given color
virtual SColor getPixel(u32 x, u32 y) const =0
Returns a pixel.
virtual u32 getBytesPerPixel() const =0
Returns bytes per pixel.
virtual u32 getGreenMask() const =0
Returns mask for green value of a pixel.
virtual const core::dimension2d< u32 > & getDimension() const =0
Returns width and height of image data.
virtual u32 getBlueMask() const =0
Returns mask for blue value of a pixel.
virtual u32 getAlphaMask() const =0
Returns mask for alpha value of a pixel.
virtual void copyToScalingBoxFilter(IImage *target, s32 bias=0, bool blend=false)=0
copies this surface into another, scaling it to fit, appyling a box filter
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 u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
get the amount of Bits per Pixel of the given color format
virtual void copyToWithAlpha(IImage *target, const core::position2d< s32 > &pos, const core::rect< s32 > &sourceRect, const SColor &color, const core::rect< s32 > *clipRect=0)=0
copies this surface into another, using the alpha mask and cliprect and a color to add with
virtual void setPixel(u32 x, u32 y, const SColor &color, bool blend=false)=0
Sets a pixel.
virtual u32 getImageDataSizeInPixels() const =0
Returns image data size in pixels.
virtual void copyToScaling(IImage *target)=0
Copies the image into the target, scaling the image to fit.
virtual u32 getPitch() const =0
Returns pitch of image.
virtual u32 getImageDataSizeInBytes() const =0
Returns image data size in bytes.
virtual u32 getRedMask() const =0
Returns mask for red value of a pixel.
static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format)
test if the color format is only viable for RenderTarget textures
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
virtual void * lock()=0
Lock function. Use this to get a pointer to the image data.
virtual ECOLOR_FORMAT getColorFormat() const =0
Returns the color format.
virtual void unlock()=0
Unlock function.
virtual u32 getBitsPerPixel() const =0
Returns bits per pixel.
virtual void copyTo(IImage *target, const core::position2d< s32 > &pos=core::position2d< s32 >(0, 0))=0
copies this surface into another
Class representing a 32 bit ARGB color.
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
@ ECF_A1R5G5B5
16 bit color format used by the software driver.
@ ECF_A32B32G32R32F
128 bit floating point format. 32 bits are used for the red, green, blue and alpha channels.
@ ECF_R8G8B8
24 bit color, no alpha channel, but 8 bit for red, green and blue.
@ ECF_R5G6B5
Standard 16 bit color format.
@ ECF_A8R8G8B8
Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
@ ECF_A16B16G16R16F
64 bit floating point format 16 bits are used for the red, green, blue and alpha channels.
@ ECF_G32R32F
64 bit floating point format using 32 bits for the red channel and 32 bits for the green channel.
@ ECF_R16F
16 bit floating point format using 16 bits for the red channel.
@ ECF_R32F
32 bit floating point format using 32 bits for the red channel.
@ ECF_G16R16F
32 bit floating point format using 16 bits for the red channel and 16 bits for the green channel.
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
signed int s32
32 bit signed variable.