Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Cut out bitmap from TileMap — Gideros Forum

Cut out bitmap from TileMap

1dot44mb1dot44mb Member
edited December 2012 in General questions
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?

Thanks.

Dislikes: SuperHanz

Tagged:
+1 -1 (+0 / -1 )Share on Facebook

Comments

  • 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.
Sign In or Register to comment.