Dynamic Masks

If we use HTML, we can use the div overflow clip, scroll or hide functionality to not display data/images.

With groups, the only way that we can limit text/graphics etc is if we use a graphic mask. It would be really nice if there was a facility to create a dynamic mask than to create graphic for every possible size. If we could simply use something like,

local dM = graphics.dynamicMask(10,10,300,300)
local grp = display.newGroup()
grp:applyMask(dM)

this would create a mask that is rectangular and will display stuff only that is in the 10,10,300,300 window.

this would be so much more easier and helpful, specially in create the Native components with scrolling elements.

Groups being transparent allow the scroll contents to be displayed everywhere, and creating a mask using the rects and then display.save leads to weird results and crashes. so can we have dynamic masks?

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 17485 reply_id: 317485[/import]