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 void setTexture(
const Texture& texture,
bool resetRect =
false);
116 return m_texture !=
nullptr;
143 void setTextureRect(
const RectF& rect);
153 return m_textureRect;
169 void setColor(
const Color4f& color);
178 const Color4f& getColor()
const;
190 void setLimits(
float top,
float bottom,
float left,
float right);
200 void setVerticalLimits(
float top,
float bottom);
210 void setHorizontalLimits(
float left,
float right);
239 RectF getLocalBounds()
const;
251 void setAnchor(
Anchor anchor);
266 void updatePositions();
267 void updateTexCoords();
284 #ifndef DOXYGEN_SHOULD_SKIP_THIS 289 #endif // GF_NINE_PATCH_H
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the nine-patch.
Definition: NinePatch.h:152
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
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:104
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:224
A 4D vector.
Definition: Vector.h:852
bool hasTexture() const
Check if a texture is set.
Definition: NinePatch.h:115
Anchor
An anchor of a box.
Definition: Anchor.h:38
General purpose math vector.
Definition: Vector.h:61