image repeat display
Can you increase the image repeat display function? Like CSS background-repeat
Can you increase the image repeat display function? Like CSS background-repeat
Thanks to the development team of Microstudio
As a work around you could define a custom function:
init = function()
end
update = function()
end
draw = function()
screen.clear()
screen.fillSprite("icon",20)
end
//==========================================================
screen.fillSprite = function(sprite,size)
sw2 = screen.width/2
sh2 = screen.height/2
for x = -sw2 to sw2 by size
for y = -sh2 to sh2 by size
screen.drawSprite(sprite,x,y,size)
end
end
end
NOTE. This is just a very simplified example that shows how you could define it as a custom function.
No error control and only supports square sprites as it is. Add parameters and functionality as required :)
thank you for your reply.I have tried the method you provided,but the frame rate was low.I use the "map" to solve this problem.