TmxTileset
Tileset
TSX files does not contains firstGID and source.
TMX Tilesets can be both full tilesets or point to TSX file. In that case it contains only firstGID and source.
You can merge TSX file TMX Tileset into one by using new Reader(tsxXML).readTSX(tmxTileset);
.
Since Tiled 0.15, image collection tilesets do not necessarily number their tiles consecutively since gaps can occur when removing tiles.
Instance Members
The first global tile ID of this tileset (this global ID maps to the first tile in this tileset).
source: String
If this tileset is stored in an external TSX (Tile Set XML) file, this attribute refers to that file. That TSX file has the same structure as the
name: String
The name of this tileset.
The (maximum) width of the tiles in this tileset.
The (maximum) height of the tiles in this tileset.
The spacing in pixels between the tiles in this tileset (applies to the tileset image).
The margin around the tiles in this tileset (applies to the tileset image).
tileCount: Int
The number of tiles in this tileset (since 0.13)
columns: Int
The number of tile columns in the tileset. For image collection tilesets it is editable and is used when displaying the tileset. (since 0.15)
tileOffset: TmxTileOffset
This element is used to specify an offset in pixels, to be applied when drawing a tile from the related tileset. When not present, no offset is applied. Since 0.8
properties: TmxProperties
Since 0.8
image: TmxImage
As of the current version of Tiled Qt, each tileset has a single image associated with it, which is cut into smaller tiles based on the attributes defined on the tileset element. Later versions may add support for adding multiple images to a single tileset, as is possible in Tiled Java.
terrainTypes: Array<TmxTerrain>
Terrain type defines. Since 0.9
tiles: Array<TmxTilesetTile>
Extended tiles data.
grid: TmxTilesetGrid
Since 1.0
wangSets: Array<TmxWangSet>
Since 1.1
new(?firstGID: Int, ?source: String, ?name: String, ?tileWidth: Int, ?tileHeight: Int, ?spacing: Int, ?margin: Int, ?tileCount: Int, ?columns: Int, ?tileOffset: TmxTileOffset, ?properties: TmxProperties, ?image: TmxImage, ?terrainTypes: Array<TmxTerrain>, ?tiles: Array<TmxTilesetTile>, ?grid: TmxTilesetGrid, ?wangSets: Array<TmxWangSet>): Void
Name | Type | Default | Description |
---|---|---|---|
firstGID |
Int | (optional) | The first global tile ID of this tileset (this global ID maps to the first tile in this tileset). |
source |
String | (optional) | If this tileset is stored in an external TSX (Tile Set XML) file, this attribute refers to that file. That TSX file has the same structure as the |
name |
String | (optional) | The name of this tileset. |
tileWidth |
Int | (optional) | The (maximum) width of the tiles in this tileset. |
tileHeight |
Int | (optional) | The (maximum) height of the tiles in this tileset. |
spacing |
Int | (optional) | The spacing in pixels between the tiles in this tileset (applies to the tileset image). |
margin |
Int | (optional) | The margin around the tiles in this tileset (applies to the tileset image). |
tileCount |
Int | (optional) | The number of tiles in this tileset (since 0.13) |
columns |
Int | (optional) | The number of tile columns in the tileset. For image collection tilesets it is editable and is used when displaying the tileset. (since 0.15) |
tileOffset |
TmxTileOffset | (optional) | This element is used to specify an offset in pixels, to be applied when drawing a tile from the related tileset. When not present, no offset is applied. Since 0.8 |
properties |
TmxProperties | (optional) | Since 0.8 |
image |
TmxImage | (optional) | * As of the current version of Tiled Qt, each tileset has a single image associated with it, which is cut into smaller tiles based on the attributes defined on the tileset element. Later versions may add support for adding multiple images to a single tileset, as is possible in Tiled Java. |
terrainTypes |
Array<TmxTerrain> | (optional) | Terrain type defines. Since 0.9 |
tiles |
Array<TmxTilesetTile> | (optional) | Extended tiles data. |
grid |
TmxTilesetGrid | (optional) | Since 1.0 |
wangSets |
Array<TmxWangSet> | (optional) | Since 1.1 |
Metadata
Name | Parameters |
---|---|
:structInit |
- |