I need to add a functionality to TiledAsWorldEditor tool. To do this i must get a region from TileMap and create a sprite from that.
TileMap:getTile(x, y) returns index of the single tile, however i need something like TileMap:getRegion(x, y, width, height). I know it is not implemented yet but do you know a way to get region from TileMap?
Haven't used tile maps but does it fundamentally use TextureRegions internally in Gideros? If so, you could work out the positions yourself and grab whatever area you wanted. If it doesn't you could always load the texture using Texture.new as well just so you could get the right region with TextureRegion. Might be wasteful in memory but could be a solution?
@moopf i don't know if TileMap has a Texture property.
@atilim or any others, do you have any suggestions for this? It would be great if TileMap class has a "bitmap" or "full-texture" property, which gives us all of the texture that tilemap has. Then i will cut out a polygon area if possible.
Comments
@atilim or any others, do you have any suggestions for this? It would be great if TileMap class has a "bitmap" or "full-texture" property, which gives us all of the texture that tilemap has. Then i will cut out a polygon area if possible.