2D Bitmap interface.
General | |
| virtual tBool | SetMemoryAddress (tPtr apAddr, tBool abFreeData, tU32 anPitch=eInvalidHandle)=0 |
| Set the memory address. More... | |
| virtual tU32 | GetPitch () const =0 |
| Get the number of bytes per line. {Property}. More... | |
| virtual tPtr | GetData () const =0 |
| Get the data pointer. {Property}. More... | |
| virtual tU32 | GetSize () const =0 |
| Get the size in bytes. {Property}. More... | |
Derived bitmaps creation | |
| virtual iBitmap2D * | CreateResized (tI32 nW, tI32 nH) const =0 |
| Create a resized copy of this bitmap. More... | |
| virtual iBitmap2D * | CreateResizedEx (tI32 nW, tI32 nH, tBool abPreserveMipMaps) const =0 |
| Create a resized copy of this bitmap. More... | |
| virtual iBitmapCube * | CreateCubeBitmap (tU32 anWidth, const sVec2i &avPX, ePixelFormatBlit aBlitPX, const sVec2i &avNX, ePixelFormatBlit aBlitNX, const sVec2i &avPY, ePixelFormatBlit aBlitPY, const sVec2i &avNY, ePixelFormatBlit aBlitNY, const sVec2i &avPZ, ePixelFormatBlit aBlitPZ, const sVec2i &avNZ, ePixelFormatBlit aBlitNZ) const =0 |
| Create a cube bitmap from the specified 6 rectangles. More... | |
| virtual iBitmapCube * | CreateCubeBitmapCross () const =0 |
| Create a cube bitmap from a vertical or horizontal cross unfolded cube. More... | |
Pixel format | |
| virtual tBool | BeginUnpackPixels ()=0 |
| Begin unpacking pixels. More... | |
| virtual void | EndUnpackPixels ()=0 |
| End unpacking pixels. More... | |
Mip maps | |
| virtual iBitmap2D * | GetMipMap (tU32 ulIdx) const =0 |
| Get the mipmap at the specified index. More... | |
| virtual iBitmap2D * | GetLevel (tU32 anIndex) const =0 |
| Get the bitmap at the specified level. More... | |
Blitting | |
| virtual tBool | Blit (const iBitmap2D *src, tI32 xs, tI32 ys, tI32 xd, tI32 yd, tI32 w, tI32 h, ePixelFormatBlit eBlit=ePixelFormatBlit_Normal)=0 |
| Blit a bitmap in this bitmap. More... | |
| virtual tBool | BlitStretch (const iBitmap2D *src, tI32 xs, tI32 ys, tI32 xd, tI32 yd, tI32 ws, tI32 hs, tI32 wd, tI32 hd)=0 |
| Blit stretch a bitmap in this bitmap. More... | |
| virtual tBool | BlitAlpha (const iBitmap2D *src, tI32 xs, tI32 ys, tI32 xd, tI32 yd, tI32 w, tI32 h, ePixelFormatBlit eBlit, const sColor4f &acolSource, const sColor4f &acolDest, eBlendMode aBlendMode)=0 |
| Blit, with alpha blending, a bitmap in this bitmap. More... | |
| virtual tBool | BlitAlphaStretch (const iBitmap2D *src, tI32 xs, tI32 ys, tI32 xd, tI32 yd, tI32 ws, tI32 hs, tI32 wd, tI32 hd, const sColor4f &acolSource, const sColor4f &acolDest, eBlendMode aBlendMode)=0 |
| Blit stretch, with alpha blending, a bitmap in this bitmap. More... | |
Primitives | |
| virtual void | PutPixel (tI32 x, tI32 y, tPtr col)=0 |
| Put a pixel at the specified position. {NoAutomation}. More... | |
| virtual tPtr | GetPixel (tI32 x, tI32 y, tPtr pOut) const =0 |
| Get a pixel at the specified position. {NoAutomation}. More... | |
| virtual void | Clear (tPtr pColor=NULL)=0 |
| Clear the bitmap {NoAutomation}. More... | |
| virtual void | ClearRect (const sRecti &aRect, tPtr pColor)=0 |
| Clear the bitmap. More... | |
| virtual void | PutPixelf (tI32 x, tI32 y, const sColor4f &avCol)=0 |
| Put a pixel at the specified position. More... | |
| virtual sColor4f | GetPixelf (tI32 x, tI32 y) const =0 |
| Get a pixel at the specified position. More... | |
| virtual void | Clearf (const sColor4f &avCol)=0 |
| Clear the bitmap. More... | |
| virtual void | ClearRectf (const sRecti &aRect, const sColor4f &avCol)=0 |
| Clear the bitmap. More... | |
Additional Inherited Members | |
Public Member Functions inherited from iBitmapBase | |
| virtual eBitmapType | GetType () const =0 |
| Return the bitmap type. {Property}. More... | |
| virtual tU32 | GetWidth () const =0 |
| Get the texture width. {Property}. More... | |
| virtual tU32 | GetHeight () const =0 |
| Get the texture height. {Property}. More... | |
| virtual tU32 | GetDepth () const =0 |
| Get the texture depth. {Property}. More... | |
| virtual iPixelFormat * | GetPixelFormat () const =0 |
| Get the pixel format of the texture. {Property}. More... | |
| virtual tBool | CreateMipMaps (tU32 anNumMipMaps, tBool abCompute)=0 |
| Create the mipmaps. More... | |
| virtual void | RemoveMipMaps ()=0 |
| Remove the mipmaps. More... | |
| virtual tU32 | GetNumMipMaps () const =0 |
| Get the number of mipmaps. {Property}. More... | |
| virtual iBitmapBase * | Clone (ePixelFormatBlit eBlit=ePixelFormatBlit_Normal) const =0 |
| Create a copy of the bitmap. More... | |
| virtual iBitmapBase * | CreateConvertedFormat (const iPixelFormat *pFmt) const =0 |
| Create a copy of the bitmap that use the given format. More... | |
| virtual iBitmapBase * | CreateGammaCorrected (tF32 factor) const =0 |
| Create a gamma corrected bitmap. More... | |
| virtual tBool | GammaCorrect (tF32 factor)=0 |
| Correct gamma of the bitmap. More... | |
Public Member Functions inherited from iUnknown | |
| virtual tBool | IsOK () const =0 |
| Check if the object is valid. More... | |
| virtual tI32 | AddRef ()=0 |
| Signal that one more reference of the object has been created. More... | |
| virtual tI32 | Release ()=0 |
| Release a reference of the object. More... | |
| virtual void | DeleteThis ()=0 |
| Bypass any reference counting and delete this object. More... | |
| virtual void | Invalidate ()=0 |
| Invalidate the object. More... | |
| virtual iUnknown * | QueryInterface (const tUUID &aIID)=0 |
| Query an interface. More... | |
| virtual void | ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0 |
| Fill a UUID list containing the UUIDs of the implemented interfaces. More... | |
| virtual tI32 | SetNumRefs (tI32 anNumRefs)=0 |
| Set the reference counter directly. More... | |
| virtual tI32 | GetNumRefs () const =0 |
| Get the number of references to this object. More... | |
|
pure virtual |
Set the memory address.
| apAddr | is the address of the bitmap's data. |
| abFreeData | if eTrue the data will be freed automatically when the bitmap is released. |
| anPitch | if != eInvalidHandle will adjust the bitmap's pitch. |
|
pure virtual |
Get the number of bytes per line. {Property}.
|
pure virtual |
Get the data pointer. {Property}.
|
pure virtual |
Get the size in bytes. {Property}.
Create a resized copy of this bitmap.
Create a resized copy of this bitmap.
|
pure virtual |
Create a cube bitmap from the specified 6 rectangles.
|
pure virtual |
Create a cube bitmap from a vertical or horizontal cross unfolded cube.
|------------------------
| | PY | |
| | | |
|------------------------
| NX | PZ | PX | NZ |
| | | | |
|------------------------
| | NY | |
| | | |
|------------------------
|-----------------|
| | NX | |
| | | |
|-----|-----|-----|
| NY | PZ | PY |
| | | |
|-----|-----|-----|
| | PX | |
| | | |
| |-----| |
| | NZ | |
| | | |
|-----|-----|-----|
|
pure virtual |
Begin unpacking pixels.
|
pure virtual |
End unpacking pixels.
Get the mipmap at the specified index.
Get the bitmap at the specified level.
|
pure virtual |
Blit a bitmap in this bitmap.
|
pure virtual |
Blit stretch a bitmap in this bitmap.
|
pure virtual |
Blit, with alpha blending, a bitmap in this bitmap.
|
pure virtual |
Blit stretch, with alpha blending, a bitmap in this bitmap.
Put a pixel at the specified position. {NoAutomation}.
Get a pixel at the specified position. {NoAutomation}.
Clear the bitmap.
Put a pixel at the specified position.
Get a pixel at the specified position.
1.8.7