21 #ifndef GF_TILE_LAYER_H    22 #define GF_TILE_LAYER_H    31 #ifndef DOXYGEN_SHOULD_SKIP_THIS   114       return m_texture != 
nullptr;
   151       setMargin({ margin, margin });
   179       setSpacing({ spacing, spacing });
   235     void setTile(Vector2u position, 
int tile);
   244     int getTile(Vector2u position) 
const;
   266     void fillVertexArray(
VertexArray& vertices, RectU rect) 
const;
   267     void updateGeometry();
   270     Vector2u m_layerSize;
   271     Vector2u m_blockSize;
   278     Array2D<
int> m_tiles;
   284 #ifndef DOXYGEN_SHOULD_SKIP_THIS 
void setBlockSize(Vector2u blockSize)
Set the block size. 
 
A set of primitives. 
Definition: VertexArray.h:65
 
Vector2u getBlockSize() const
Get the block size. 
 
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
 
void setMargin(Vector2u margin)
Set the margin of the tileset. 
 
Data in the graphics memory. 
Definition: VertexBuffer.h:70
 
int getTile(Vector2u position) const
Get a tile. 
 
void setSpacing(unsigned spacing)
Set the spacing of the tileset. 
Definition: TileLayer.h:178
 
void setSpacing(Vector2u spacing)
Set the spacing of the tileset. 
 
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
 
static constexpr int NoTile
A constant meaning that there is no tile. 
Definition: TileLayer.h:65
 
The namespace for gf classes. 
Definition: Action.h:34
 
const Texture & getTexture() const
Get the source texture of the tileset. 
Definition: TileLayer.h:102
 
VertexBuffer commitGeometry() const
Create a buffer with the current geometry. 
 
void setTile(Vector2u position, int tile)
Set a tile. 
 
Vector2u getMargin() const
Get the margin of the tileset. 
Definition: TileLayer.h:168
 
A tile layer. 
Definition: TileLayer.h:60
 
void unsetTexture()
Unset the source texture of the tile layer. 
 
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. 
 
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