21 #ifndef GF_TILE_LAYER_H 22 #define GF_TILE_LAYER_H 25 #include "Portability.h" 26 #include "Transformable.h" 27 #include "VertexArray.h" 28 #include "VertexBuffer.h" 31 #ifndef DOXYGEN_SHOULD_SKIP_THIS 65 static constexpr
int NoTile = -1;
91 void setTexture(
const Texture& texture);
114 return m_texture !=
nullptr;
132 void setTileSize(
Vector2u tileSize);
151 setMargin({ margin, margin });
179 setSpacing({ spacing, spacing });
216 void setBlockSize(
Vector2u blockSize);
235 void setTile(
Vector2u position,
int tile);
244 int getTile(
Vector2u position)
const;
267 void updateGeometry();
284 #ifndef DOXYGEN_SHOULD_SKIP_THIS 289 #endif // GF_TILE_LAYER_H
A set of primitives.
Definition: VertexArray.h:65
bool hasTexture() const
Check if a texture is set.
Definition: TileLayer.h:113
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
Data in the graphics memory.
Definition: VertexBuffer.h:70
void setSpacing(unsigned spacing)
Set the spacing of the tileset.
Definition: TileLayer.h:178
void setMargin(unsigned margin)
Set the margin of the tileset.
Definition: TileLayer.h:150
A texture for colored images.
Definition: Texture.h:339
Vector2u getTileSize() const
Get the tile size in the tileset.
Definition: TileLayer.h:140
Vector2u getSpacing() const
Get the spacing of the tileset.
Definition: TileLayer.h:196
The namespace for gf classes.
Definition: Action.h:34
const Texture & getTexture() const
Get the source texture of the tileset.
Definition: TileLayer.h:102
Vector2u getMargin() const
Get the margin of the tileset.
Definition: TileLayer.h:168
A tile layer.
Definition: TileLayer.h:60