PERRY v1.0.0
P-E-R-R-Y/PERRY helps creating games with a bunch of tools.
Loading...
Searching...
No Matches
SdlSprite Class Reference

Used to handle images. More...

#include <SdlSprite.hpp>

Inheritance diagram for SdlSprite:
graphic::ISprite

Public Member Functions

 SdlSprite (std::string path)
 Construct a new Sdl Sprite object.
 
 ~SdlSprite () override
 Destroy the Sdl Sprite object.
 
bool isReady () const override
 check if the sprite is ready
 
__v4f_t getBounds () const override
 Get the Bounds object.
 
void setCrop (__v4f_t rect) override
 Set the Crop object.
 
__v2f_t getPosition () const override
 Get the Position object.
 
void setPosition (__v2f_t position) override
 Set the Position object.
 
float getRotation () const override
 Get the Rotation object.
 
void setRotation (float angle, bool isRad=false) override
 Set the Rotation object.
 
__v2f_t getSize () const override
 Get the Size object.
 
void setSize (__v2f_t size) override
 Set the Size object.
 
- Public Member Functions inherited from graphic::ISprite
virtual ~ISprite ()=default
 Destroy the ISprite object.
 
virtual void setCrop (__v4f_t rect)=0
 Crop the sprite with a rectangle.
 
virtual void setPosition (__v2f_t position)=0
 Set the Position object.
 
virtual void setSize (__v2f_t size)=0
 Set the Sprite size.
 

Private Attributes

SDL_Surface * _surface
 
SDL_Texture * _texture
 
__v2f_t _position
 
SDL_Rect _crop
 
float _rotation
 

Friends

class SdlWindow
 

Detailed Description

Used to handle images.


The documentation for this class was generated from the following file: