21 #ifndef GF_TILE_LAYER_H 22 #define GF_TILE_LAYER_H 27 #include "Portability.h" 29 #include "Transformable.h" 30 #include "VertexArray.h" 31 #include "VertexBuffer.h" 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 68 static constexpr
int NoTile = -1;
92 return m_tiles.getSize();
112 void setTexture(
const Texture& texture);
135 return m_texture !=
nullptr;
153 void setTileSize(
Vector2u tileSize);
172 setMargin({ margin, margin });
200 setSpacing({ spacing, spacing });
237 void setBlockSize(
Vector2u blockSize);
266 int getTile(
Vector2u position)
const;
296 RectF getLocalBounds()
const;
308 void setAnchor(
Anchor anchor);
330 void updateGeometry();
351 #ifndef DOXYGEN_SHOULD_SKIP_THIS 356 #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:134
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
StaggerAxis
Stagger axis in a staggered or hexagonal map.
Definition: Stagger.h:48
void setSpacing(unsigned spacing)
Set the spacing of the tileset.
Definition: TileLayer.h:199
Type
The type of tile layer.
Definition: TileLayer.h:73
void setMargin(unsigned margin)
Set the margin of the tileset.
Definition: TileLayer.h:171
Vector2u getMapSize() const
Get the size of the layer.
Definition: TileLayer.h:91
A texture for colored images.
Definition: Texture.h:339
Vector2u getTileSize() const
Get the tile size in the tileset.
Definition: TileLayer.h:161
Vector2u getSpacing() const
Get the spacing of the tileset.
Definition: TileLayer.h:217
The namespace for gf classes.
Definition: Action.h:35
const Texture & getTexture() const
Get the source texture of the tileset.
Definition: TileLayer.h:123
Vector2u getMargin() const
Get the margin of the tileset.
Definition: TileLayer.h:189
A tile layer.
Definition: TileLayer.h:63
A staggered tile layer.
Definition: TileLayer.h:75
Anchor
An anchor of a box.
Definition: Anchor.h:38
StaggerIndex
Stagger index in a staggered or hexagonal map.
Definition: Stagger.h:37
An orthogonal tile layer.
Definition: TileLayer.h:74
An orthogonal orientation.