#include <KeosTexture.h>
Public Member Functions | |
| void | Create (const TVector2I &Size, TPixelFormat Format, ulong nFlags=0, const String &strName="") |
| Create an empty texture. | |
| void | CreateFromFile (const String &strFilename, TPixelFormat Format, ulong nFlags=0) |
| Create texture from a file. | |
| void | CreateFromImage (const CImage &Image, TPixelFormat Format, ulong nFlags=0, const String &strName="") |
| Create texture from an image. | |
| void | SaveToFile (const String &strFilename) const |
| Save the texture in a file. | |
| void | Update (const CRectangle &Rect=CRectangle(-1,-1,-1,-1)) |
| Update the pixels of the texture. | |
| CImage & | GetPixels () |
| Return an image with the pixels of the texture. | |
| const TVector2I & | GetSize () const |
| Return the dimensions of the texture. | |
| TPixelFormat | GetFormat () const |
| Return the format of the texture. | |
| const String & | GetName () const |
| Return the name associated to the texture. | |
| const ITextureBase * | GetTextureBase () const |
| Return a pointer on the intern texture. | |
| bool | operator== (const CTexture &Texture) const |
| == operator. | |
| bool | operator!= (const CTexture &Texture) const |
| != operator. | |
Definition at line 34 of file KeosTexture.h.
| void Keos::CTexture::Create | ( | const TVector2I & | Size, | |
| TPixelFormat | Format, | |||
| ulong | nFlags = 0, |
|||
| const String & | strName = "" | |||
| ) |
Create an empty texture.
| Size | Dimensions. | |
| Format | Pixel format. | |
| nFlags | Load options (default 0). | |
| strName | Name associated to the texture (default ""). |
Definition at line 38 of file KeosTexture.cpp.
References CreateFromImage().
| void Keos::CTexture::CreateFromFile | ( | const String & | strFilename, | |
| TPixelFormat | Format, | |||
| ulong | nFlags = 0 | |||
| ) |
Create texture from a file.
| strFilename | Path of the file. | |
| Format | Pixel format. | |
| nFlags | Load options (default 0). |
Definition at line 45 of file KeosTexture.cpp.
References Keos::CSingleton< T >::Instance().
Referenced by Keos::CMaterial::CreateTexture().
| void Keos::CTexture::CreateFromImage | ( | const CImage & | Image, | |
| TPixelFormat | Format, | |||
| ulong | nFlags = 0, |
|||
| const String & | strName = "" | |||
| ) |
Create texture from an image.
| Image | Image to be loaded. | |
| Format | Pixel format. | |
| nFlags | Load options (default 0). | |
| strName | Name associated to the texture (default ""). |
Definition at line 61 of file KeosTexture.cpp.
References Keos::CSingleton< T >::Instance().
Referenced by Create(), and Keos::CMaterial::CreateTexture().
| void Keos::CTexture::SaveToFile | ( | const String & | strFilename | ) | const |
Save the texture in a file.
| strFilename | Path of the target file. |
Definition at line 121 of file KeosTexture.cpp.
References Keos::CSingleton< T >::Instance().
| void Keos::CTexture::Update | ( | const CRectangle & | Rect = CRectangle(-1,-1,-1,-1) |
) |
Update the pixels of the texture.
| Rect | Rectangle to update in the texture (default (-1,-1,-1,-1)). |
Definition at line 127 of file KeosTexture.cpp.
References GetSize(), and Keos::CRectangle::Width().
| CImage & Keos::CTexture::GetPixels | ( | ) |
| const TVector2I & Keos::CTexture::GetSize | ( | ) | const |
Return the dimensions of the texture.
Definition at line 142 of file KeosTexture.cpp.
Referenced by Update().
| TPixelFormat Keos::CTexture::GetFormat | ( | ) | const |
| const String & Keos::CTexture::GetName | ( | ) | const |
| const ITextureBase * Keos::CTexture::GetTextureBase | ( | ) | const |
| bool Keos::CTexture::operator== | ( | const CTexture & | Texture | ) | const |
| bool Keos::CTexture::operator!= | ( | const CTexture & | Texture | ) | const |
1.5.1-p1