Loading...
Searching...
No Matches
Sprite.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
Abstract base class for objects that can be drawn to a render target.
Definition Drawable.hpp:44
Base class for all render targets (window, texture, ...)
Definition RenderTarget.hpp:63
Drawable representation of a texture, with its own transformations, color, etc.
Definition Sprite.hpp:51
Sprite(const Texture &texture, const IntRect &rectangle)
Construct the sprite from a sub-rectangle of a source texture.
void setTexture(const Texture &texture, bool resetRect=false)
Change the source texture of the sprite.
void setTextureRect(const IntRect &rectangle)
Set the sub-rectangle of the texture that the sprite will display.
Sprite(const Texture &&texture)=delete
Disallow construction from a temporary texture.
void setTexture(const Texture &&texture, bool resetRect=false)=delete
Disallow setting from a temporary texture.
FloatRect getGlobalBounds() const
Get the global bounding rectangle of the entity.
Sprite(const Texture &&texture, const IntRect &rectangle)=delete
Disallow construction from a temporary texture.
FloatRect getLocalBounds() const
Get the local bounding rectangle of the entity.
const IntRect & getTextureRect() const
Get the sub-rectangle of the texture displayed by the sprite.
Decomposed transform defined by a position, a rotation and a scale.
Definition Transformable.hpp:44
Definition AudioResource.hpp:36