21 #ifndef GF_NINE_PATCH_H
22 #define GF_NINE_PATCH_H
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
143 return m_textureRect;
159 void setColor(
const Color4f& color);
180 void setLimits(
float top,
float bottom,
float left,
float right);
256 void updatePositions();
257 void updateTexCoords();
274 #ifndef DOXYGEN_SHOULD_SKIP_THIS
void setTexture(const Texture &texture, bool resetRect=false)
Change the source texture of the nine-patch.
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the nine-patch.
Definition: NinePatch.h:142
const Texture * getTexture() const
Get the source texture of the nine-patch.
Definition: NinePatch.h:105
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:65
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
void setColor(const Color4f &color)
Set the global color of the nine-patch.
void setAnchor(Anchor anchor)
Set the anchor origin of the entity.
Data in the graphics memory.
Definition: VertexBuffer.h:70
void setVerticalLimits(float top, float bottom)
Set the vertical limits of the stretchable area.
NinePatch()
Default constructor.
A texture for colored images.
Definition: Texture.h:339
void setSize(Vector2f size)
Set the size of the stretched area.
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
void setHorizontalLimits(float left, float right)
Set the horizontal limits of the stretchable area.
const Color4f & getColor() const
Get the global color of the nine-patch.
Anchor
The origin anchor of the transformable object.
Definition: Transformable.h:45
void setTextureRect(const RectF &rect)
Set the sub-rectangle of the texture that the nine-patch will display.
#define GF_API
Definition: Portability.h:35
void setLimits(float top, float bottom, float left, float right)
Set the limits of the stretchable area.
void unsetTexture()
Unset the source texture of the nine-patch.
NinePatch(const Texture &texture)
Construct the nine-patch from a source texture.
RectF getLocalBounds() const
Get the local bounding rectangle of the entity.
Vector2f getSize() const
Get the size of the stretched area.
Definition: NinePatch.h:214
NinePatch(const Texture &texture, const RectF &textureRect)
Construct the nine-patch from a sub-rectangle of a source texture.
virtual void draw(RenderTarget &target, RenderStates states) override
Draw the object to a render target.