21 #ifndef GF_TILE_LAYER_H
22 #define GF_TILE_LAYER_H
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
215 void setTile(Vector2u position,
int tile);
224 int getTile(Vector2u position)
const;
236 void updateGeometry();
239 Vector2u m_layerSize;
240 Vector2u m_blockSize;
253 #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:148
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:354
void setSpacing(unsigned spacing)
Set the spacing of the tileset.
Definition: TileLayer.h:158
void setSpacing(Vector2u spacing)
Set the spacing of the tileset.
void setMargin(unsigned margin)
Set the margin of the tileset.
Definition: TileLayer.h:130
A texture for colored images.
Definition: Texture.h:339
static constexpr int NoTile
A constant meaning that there is no tile.
Definition: TileLayer.h:64
const Texture * getTexture() const
Get the source texture of the tileset.
Definition: TileLayer.h:102
Vector2u getSpacing() const
Get the spacing of the tileset.
Definition: TileLayer.h:176
Vector2u getBlockSize() const
Get the block size.
void setTile(Vector2u position, int tile)
Set a tile.
A tile layer.
Definition: TileLayer.h:59
Vector2u getTileSize() const
Get the tile size in the tileset.
Definition: TileLayer.h:120
TileLayer(Vector2u layerSize)
Constructor.
void clear()
Remove all the tiles.
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