cImage Surface

This commit is contained in:
2018-06-30 02:33:48 -04:00
parent 269cbf8604
commit 93a6e9ccad
14 changed files with 120 additions and 36 deletions
@@ -17,9 +17,9 @@ namespace VideoEngine {
class EXPORT_FROM_MYDLL cImage
{
public:
cImage( const cString& dir = "", const cString& filename = "", const bool transparent = false,
cImage( const cString& filename = "", const cString& dir = "", const bool transparent = false,
const unsigned char red = 0, const unsigned char blue = 0, const unsigned char green = 255,
const unsigned char translevel = 255);
const unsigned char translevel = 255, const bool isSurface = false );
cImage( SDL_Surface* surface );
cImage( SDL_Texture* texture );
/* Copy constructor */
@@ -78,6 +78,8 @@ namespace VideoEngine {
/* Gets the transparent level 255 = clear, 0 = solid */
const unsigned char getLevelTrans() const;
const bool getIsSurface() const;
protected:
/* Protected so only derived class can access. *.
/* Sets the image to surface */
@@ -93,6 +95,7 @@ namespace VideoEngine {
private:
///Variables
SDL_Texture* mp_texture;// = nullptr
SDL_Surface* mp_surface;// = nullptr
cString m_dir;// = ""
cString m_fileName;// = ""
@@ -106,7 +109,9 @@ namespace VideoEngine {
unsigned char m_transBlue;// = 0
unsigned char m_transGreen;// = 255
unsigned char m_transLevel;// = 255
unsigned char m_transLevel;// = 255
bool m_isSurface;
};/// END CLASS DEFINITION cImage
}/// END NAMESPACE DEFINITION VideoEngine
#endif/// END IFNDEF _CIMAGE_HPP_