Imported graphics updates from Codebase
This commit is contained in:
+18
-18
@@ -26,33 +26,33 @@
|
||||
|
||||
class Image {
|
||||
public:
|
||||
Image();
|
||||
Image() = default;
|
||||
Image(SDL_Surface*);
|
||||
Image(SDL_Surface*, SDL_Rect);
|
||||
virtual ~Image() {}
|
||||
~Image() = default;
|
||||
|
||||
virtual SDL_Surface* SetSurface(SDL_Surface*);
|
||||
virtual SDL_Surface* SetSurface(SDL_Surface*, SDL_Rect);
|
||||
virtual SDL_Surface* GetSurface() const;
|
||||
SDL_Surface* SetSurface(SDL_Surface*);
|
||||
SDL_Surface* SetSurface(SDL_Surface*, SDL_Rect);
|
||||
SDL_Surface* GetSurface() const { return surface; }
|
||||
|
||||
virtual void DrawTo(SDL_Surface* const, Sint16 x, Sint16 y);
|
||||
void DrawTo(SDL_Surface* const, Sint16 x, Sint16 y);
|
||||
|
||||
//Clip handlers
|
||||
virtual SDL_Rect SetClip(SDL_Rect r) { return clip = r; }
|
||||
virtual SDL_Rect GetClip() const { return clip; }
|
||||
SDL_Rect SetClip(SDL_Rect r) { return clip = r; }
|
||||
SDL_Rect GetClip() const { return clip; }
|
||||
|
||||
virtual Sint16 SetClipX(Sint16 x) { return clip.x = x; }
|
||||
virtual Sint16 SetClipY(Sint16 y) { return clip.y = y; }
|
||||
virtual Uint16 SetClipW(Uint16 w) { return clip.w = w; }
|
||||
virtual Uint16 SetClipH(Uint16 h) { return clip.h = h; }
|
||||
Sint16 SetClipX(Sint16 x) { return clip.x = x; }
|
||||
Sint16 SetClipY(Sint16 y) { return clip.y = y; }
|
||||
Uint16 SetClipW(Uint16 w) { return clip.w = w; }
|
||||
Uint16 SetClipH(Uint16 h) { return clip.h = h; }
|
||||
|
||||
virtual Sint16 GetClipX() const { return clip.x; }
|
||||
virtual Sint16 GetClipY() const { return clip.y; }
|
||||
virtual Uint16 GetClipW() const { return clip.w; }
|
||||
virtual Uint16 GetClipH() const { return clip.h; }
|
||||
Sint16 GetClipX() const { return clip.x; }
|
||||
Sint16 GetClipY() const { return clip.y; }
|
||||
Uint16 GetClipW() const { return clip.w; }
|
||||
Uint16 GetClipH() const { return clip.h; }
|
||||
protected:
|
||||
SDL_Surface* surface;
|
||||
SDL_Rect clip;
|
||||
SDL_Surface* surface = nullptr;
|
||||
SDL_Rect clip = {0, 0, 0, 0};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user