21 #ifndef GF_TILE_LAYER_H 22 #define GF_TILE_LAYER_H 26 #include "Portability.h" 28 #include "TileTypes.h" 29 #include "Transformable.h" 30 #include "VertexArray.h" 31 #include "VertexBuffer.h" 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 69 static constexpr
int NoTile = -1;
90 return m_tiles.getSize();
110 void setTexture(
const Texture& texture);
133 return m_texture !=
nullptr;
151 void setTilesetTileSize(
Vector2i tileSize);
160 return m_tilesetTileSize;
170 setMargin({ margin, margin });
198 setSpacing({ spacing, spacing });
250 void setTileSize(
Vector2i tileSize);
279 int getTile(
Vector2i position)
const;
309 RectF getLocalBounds()
const;
321 void setAnchor(
Anchor anchor);
343 void updateGeometry();
365 #ifndef DOXYGEN_SHOULD_SKIP_THIS 370 #endif // GF_TILE_LAYER_H
Vector2i getTileSize() const
Get the tile size.
Definition: TileLayer.h:258
A set of primitives.
Definition: VertexArray.h:65
bool hasTexture() const
Check if a texture is set.
Definition: TileLayer.h:132
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:90
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
Vector2i getMargin() const
Get the margin of the tileset.
Definition: TileLayer.h:187
Data in the graphics memory.
Definition: VertexBuffer.h:77
Orientation orientation(float angle)
Get an orientation from an angle.
A texture for colored images.
Definition: Texture.h:309
void setMargin(int margin)
Set the margin of the tileset.
Definition: TileLayer.h:169
Vector2i getMapSize() const
Get the size of the layer.
Definition: TileLayer.h:89
The namespace for gf classes.
Definition: Action.h:35
const Texture & getTexture() const
Get the source texture of the tileset.
Definition: TileLayer.h:121
Vector2i getOffset() const
Get the offset of the tileset.
Definition: TileLayer.h:233
MapCellIndex
Map cell index in a map celled or hexagonal map.
Definition: MapCell.h:35
void setSpacing(int spacing)
Set the spacing of the tileset.
Definition: TileLayer.h:197
A tile layer.
Definition: TileLayer.h:64
constexpr ArrayRef< T > array(const T *data, std::size_t size)
Create a constant reference to an array.
Definition: ArrayRef.h:204
Anchor
An anchor of a box.
Definition: Anchor.h:38
Vector2i getSpacing() const
Get the spacing of the tileset.
Definition: TileLayer.h:215
Vector2i getTilesetTileSize() const
Get the tile size in the tileset.
Definition: TileLayer.h:159
An orthogonal orientation.
MapCellAxis
Map cell axis in a map celled.
Definition: MapCell.h:46
TileOrientation
The orientation of the tile.
Definition: TileTypes.h:37