21 #ifndef GF_NINE_PATCH_H 22 #define GF_NINE_PATCH_H 24 #include "GraphicsApi.h" 25 #include "Transformable.h" 27 #include "VertexBuffer.h" 30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 92 [[deprecated(
"You should use setTexture(const Texture&, const RectF&) instead")]]
93 void setTexture(
const Texture& texture,
bool resetRect);
135 return m_texture !=
nullptr;
162 void setTextureRect(
const RectF& rect);
172 return m_textureRect;
188 void setColor(
const Color4f& color);
197 const Color4f& getColor()
const;
209 void setLimits(
float top,
float bottom,
float left,
float right);
219 void setVerticalLimits(
float top,
float bottom);
229 void setHorizontalLimits(
float left,
float right);
258 RectF getLocalBounds()
const;
270 void setAnchor(
Anchor anchor);
285 void updatePositions();
286 void updateTexCoords();
303 #ifndef DOXYGEN_SHOULD_SKIP_THIS 308 #endif // GF_NINE_PATCH_H
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the nine-patch.
Definition: NinePatch.h:171
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 nine-patch.
Definition: NinePatch.h:46
A point associated with a color and a texture coordinate.
Definition: Vertex.h:75
const Texture & getTexture() const
Get the source texture of the nine-patch.
Definition: NinePatch.h:123
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
Vector2f getSize() const
Get the size of the stretched area.
Definition: NinePatch.h:243
A 4D vector.
Definition: Vector.h:852
bool hasTexture() const
Check if a texture is set.
Definition: NinePatch.h:134
Anchor
An anchor of a box.
Definition: Anchor.h:38
General purpose math vector.
Definition: Vector.h:61