21 #ifndef GF_TILE_LAYER_H
22 #define GF_TILE_LAYER_H
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
216 void setTile(Vector2u position,
int tile);
225 int getTile(Vector2u position)
const;
247 void fillVertexArray(
VertexArray& vertices, RectU rect)
const;
248 void updateGeometry();
251 Vector2u m_layerSize;
252 Vector2u m_blockSize;
265 #ifndef DOXYGEN_SHOULD_SKIP_THIS
A two-dimensional array.
Definition: Array2D.h:55
void setBlockSize(Vector2u blockSize)
Set the block size.
A set of primitives.
Definition: VertexArray.h:65
Vector2u getMargin() const
Get the margin of the tileset.
Definition: TileLayer.h:149
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
void setMargin(Vector2u margin)
Set the margin of the tileset.
constexpr Vector(T x, T y)
Constructor that takes 2 components.
Definition: Vector.h:348
Data in the graphics memory.
Definition: VertexBuffer.h:70
void setSpacing(unsigned spacing)
Set the spacing of the tileset.
Definition: TileLayer.h:159
void setSpacing(Vector2u spacing)
Set the spacing of the tileset.
void setMargin(unsigned margin)
Set the margin of the tileset.
Definition: TileLayer.h:131
A texture for colored images.
Definition: Texture.h:339
static constexpr int NoTile
A constant meaning that there is no tile.
Definition: TileLayer.h:65
const Texture * getTexture() const
Get the source texture of the tileset.
Definition: TileLayer.h:103
Vector2u getSpacing() const
Get the spacing of the tileset.
Definition: TileLayer.h:177
The namespace for gf classes.
Definition: Action.h:34
Vector2u getBlockSize() const
Get the block size.
void setTile(Vector2u position, int tile)
Set a tile.
A tile layer.
Definition: TileLayer.h:60
Vector2u getTileSize() const
Get the tile size in the tileset.
Definition: TileLayer.h:121
TileLayer(Vector2u layerSize)
Constructor.
void clear()
Remove all the tiles.
VertexBuffer commitGeometry() const
Create a buffer with the current geometry.
virtual void draw(RenderTarget &target, RenderStates states) override
Draw the object to a render target.
int getTile(Vector2u position) const
Get a tile.
void setTileSize(Vector2u tileSize)
Set the tile size in the tileset.
void setTexture(const Texture &texture)
Change the source texture of the tileset.
#define GF_API
Definition: Portability.h:35