21 #ifndef GF_NINE_PATCH_H    22 #define GF_NINE_PATCH_H    30 #ifndef DOXYGEN_SHOULD_SKIP_THIS   116       return m_texture != 
nullptr;
   153       return m_textureRect;
   169     void setColor(
const Color4f& color);
   190     void setLimits(
float top, 
float bottom, 
float left, 
float right);
   266     void updatePositions();
   267     void updateTexCoords();
   284 #ifndef DOXYGEN_SHOULD_SKIP_THIS 
const RectF & getTextureRect() const
Get the sub-rectangle of the texture displayed by the nine-patch. 
Definition: NinePatch.h:152
 
void setTexture(const Texture &texture, bool resetRect=false)
Change the source texture of the nine-patch. 
 
const Color4f & getColor() const
Get the global color of the nine-patch. 
 
Base class for all render targets (window, texture, ...) 
Definition: RenderTarget.h:66
 
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. 
 
const Texture & getTexture() const
Get the source texture of the nine-patch. 
Definition: NinePatch.h:104
 
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
 
The namespace for gf classes. 
Definition: Action.h:34
 
Vector2f getSize() const
Get the size of the stretched area. 
Definition: NinePatch.h:224
 
void setSize(Vector2f size)
Set the size of the stretched area. 
 
void setHorizontalLimits(float left, float right)
Set the horizontal limits of the stretchable area. 
 
bool hasTexture() const
Check if a texture is set. 
Definition: NinePatch.h:115
 
Anchor
An anchor of a box. 
Definition: Anchor.h:41
 
VertexBuffer commitGeometry() const
Create a buffer with the current geometry. 
 
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. 
 
RectF getLocalBounds() const
Get the local bounding rectangle of the entity. 
 
NinePatch(const Texture &texture)
Construct the nine-patch from a source texture. 
 
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.