27 #include "BasicSprite.h" 28 #include "GraphicsApi.h" 29 #include "Transformable.h" 31 #include "VertexBuffer.h" 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 121 [[deprecated(
"You should use setTexture(const Texture&, const RectF&) instead")]]
122 void setTexture(
const Texture& texture,
bool resetRect);
153 return m_basic.getTexture();
164 return m_basic.hasTexture();
191 void setTextureRect(
const RectF& rect);
201 return m_basic.getTextureRect();
217 void setColor(
const Color4f& color);
226 const Color4f& getColor()
const;
240 RectF getLocalBounds()
const;
252 void setAnchor(
Anchor anchor);
271 #ifndef DOXYGEN_SHOULD_SKIP_THIS 276 #endif // GF_SPRITE_H
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
static constexpr Rect< float > fromSize(Vector< float, 2 > size) noexcept
Create a rectangle from a size.
Definition: Rect.h:129
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:75
Data in the graphics memory.
Definition: VertexBuffer.h:81
A texture for colored images.
Definition: Texture.h:313
The namespace for gf classes.
Definition: Action.h:35
A 4D vector.
Definition: Vector.h:852
Anchor
An anchor of a box.
Definition: Anchor.h:38
bool hasTexture() const
Check if a texture is set.
Definition: Sprite.h:163
A basic sprite.
Definition: BasicSprite.h:46
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the sprite.
Definition: Sprite.h:200
const Texture & getTexture() const
Get the source texture of the sprite.
Definition: Sprite.h:152