Back in our old Graphics 1.0 days, some objects were referenced by their top, left corner. Others were referenced by their center. This created a lot of inconsistency in our APIs. In the instance of a circle, you would naturally want to X and Y to reference its center. In some cases, it feels right to reference rectangle objects by the top, left corner and at other times it makes more natural sense to reference it by its center. You can change the default anchor points to be something different than center if it makes sense for your app.
But consider this scenario. You want to construct a button which is a display.newText() drawn on top of a display.newRect():
If you use the top, left corners of the display.newRect() and the top, left corners of the display.newText() and you want to resize the button, you have to do a lot of calculations to get the text centered in the rectangle as opposed to:
local buttonBackground = display.newRect( 200, 100, 256, 128 ) buttonBackground:setFillColor( 0.25, 0.5, 1.0 ) local buttonText = display.newText( "Tap Me", buttonBackground.x, buttonBackground.y, "Exo 2 Black", 48 )
With that code, you can change the size of the button without having to think about positioning the text. You can change the X, Y of the background and the text will center itself (* Note if you move the background after you create the object, you would need to move the text to buttonText.x = buttonBackground.x, etc. to keep them together.
So there is a considerable benefit to centering objects.
Rob