Is x/y the center of an image?

Hi,

When I try to set the x/y of an image it seems that position is in the middle of the image. I am using to it being the top/left of the image. Why does it seem to be the middle instead? I am using:

local rect = display.newImage(filename)  
rect.x = 25  
rect.y = 80  

Warren
[import]uid: 184193 topic_id: 34301 reply_id: 334301[/import]

Yes, the X/Y is, by default, the center of the image. However, you can change this by setting a reference point on the image, in which case the “origin” will become that new point. Check out the following page to see how this is done:

http://developer.coronalabs.com/reference/index/objectsetreferencepoint

Best regards,
Brent [import]uid: 200026 topic_id: 34301 reply_id: 136368[/import]

Yes, the X/Y is, by default, the center of the image. However, you can change this by setting a reference point on the image, in which case the “origin” will become that new point. Check out the following page to see how this is done:

http://developer.coronalabs.com/reference/index/objectsetreferencepoint

Best regards,
Brent [import]uid: 200026 topic_id: 34301 reply_id: 136368[/import]