Add support for image tile sub-rect

This commit is contained in:
Darren Eberly
2022-08-13 00:13:19 -04:00
parent 95ed454e95
commit 58deab5f78
9 changed files with 88 additions and 7 deletions

View File

@@ -105,6 +105,8 @@ EXPECTED = tiled_map.TiledMap(
image_width=32,
properties={"float property": 2.2},
class_="tile",
width=32,
height=32,
),
1: tileset.Tile(
id=1,
@@ -147,6 +149,8 @@ EXPECTED = tiled_map.TiledMap(
),
],
),
width=32,
height=32,
properties={"string property": "testing"},
class_="tile",
),
@@ -159,6 +163,8 @@ EXPECTED = tiled_map.TiledMap(
image_width=32,
properties={"bool property": True},
class_="tile",
width=32,
height=32,
),
3: tileset.Tile(
id=3,
@@ -167,6 +173,8 @@ EXPECTED = tiled_map.TiledMap(
.resolve(),
image_height=32,
image_width=32,
width=32,
height=32,
class_="tile",
),
},

View File

@@ -106,6 +106,8 @@ EXPECTED = tiled_map.TiledMap(
.resolve(),
image_height=32,
image_width=32,
width=32,
height=32
)
},
tile_count=1,