Image Texture tiling through texture coordinate scaling

With corna image objects I’d like to dynamically change the texture scaling so that I can define an imageRect, scale it to a certain size, and scale the texture inside to create a tiling effect.

To create a tiled effect using the same image we have to create multiple instances of that image, it would be much easier to scale the texture coords inside the image to tile the image within imageRect bounds

This is an easy thing to implement in OpenGL ES by simply manipulating the texture coords and setting the texture to repeat itself when it’s not 1:1. It just has to be exposed in Corona.

for example to create a 2x2 tiled image filling the screen

local image = display.newImageRect(“image.png”,320,480)
image.x = display.contentCenterX
image.y = display.contentCenterY
image.textureXScale = 0.5
image.textuerYScale = 0.5 [import]uid: 88628 topic_id: 28711 reply_id: 328711[/import]