you can get the display object bounds using object.contentBounds
Example:
|
1 2 3 4 5 6 7 |
local img = display.newImage('square.png'); local bounds = img.contentBounds print("xMin: ".. bounds.xMin) print("yMin: ".. bounds.yMin) print("xMax: ".. bounds.xMax) print("yMax: ".. bounds.yMax) |
Incoming search terms:
- corona sdk content bounds
- corona sdk xMax
Tagged with: Corona • Img • Png
Filed under: Corona
Like this post? Subscribe to my RSS feed and get loads more!




Leave a Reply