Instead of having to create masks for display objects and widgets, the ability to create them in memory on the fly. This would be especially helpful on devices with varying screen sizes.
Calling this function would return a object that is a solid white bitmap of the width and height, with a black four pixel border. The resulting object would mimic a loaded file.
It could be used in the following ways:
To create:
local objMask = display.newMaxBitmap(208,208)
or objMask = graphics.newMaskBitmap(208,208)
The resulting bitmap would be 200x200 white space with 4PX black along top, right, bottom, and left.
Examples of use:
myGraphic:setMask( objMask )
local listOptions = {
top = display.statusBarHeight,
height = 410,
maskFile = objMask
}
local scrollView = widget.newScrollView{
width = 320
height = 320,
scrollWidth = 768,
scrollHeight = 1024,
maskFile=objMask,
listener = scrollViewListener
}
[import]uid: 13784 topic_id: 23270 reply_id: 323270[/import]