33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
184 return m_textureRect;
200 void setColor(
const Color4f& color);
250 void updatePositions();
251 void updateTexCoords();
260 #ifndef DOXYGEN_SHOULD_SKIP_THIS
Sprite()
Default constructor.
Sprite(const Texture &texture)
Construct the sprite from a source texture.
void setAnchor(Anchor anchor)
Set the anchor origin of the entity.
RectF getLocalBounds() const
Get the local bounding rectangle of the entity.
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:65
const Color4f & getColor() const
Get the global color of the sprite.
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75
A drawable representation of a texture, with its own transformations, color, etc. ...
Definition: Sprite.h:87
Data in the graphics memory.
Definition: VertexBuffer.h:70
void setColor(const Color4f &color)
Set the global color of the sprite.
Sprite(const Texture &texture, const RectF &textureRect)
Construct the sprite from a sub-rectangle of a source texture.
A texture for colored images.
Definition: Texture.h:339
virtual void draw(RenderTarget &target, RenderStates states) override
Draw the object to a render target.
const Texture * getTexture() const
Get the source texture of the sprite.
Definition: Sprite.h:146
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
void setTexture(const Texture &texture, bool resetRect=false)
Change the source texture of the sprite.
Anchor
The origin anchor of the transformable object.
Definition: Transformable.h:45
void unsetTexture()
Unset the source texture of the sprite.
void setTextureRect(const RectF &rect)
Set the sub-rectangle of the texture that the sprite will display.
#define GF_API
Definition: Portability.h:35
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the sprite.
Definition: Sprite.h:183