newImageRect vs newImage reference point issue

Hello,

I suppose I am doing something wrong, but I have this problem.

In the following example, the letters are perfectly centered into the tile (which is a 62x31 png image).

local wordTile = display.newGroup();
local wordTileBackground = display.newImage(“tile.png”)
wordTile:insert(wordTileBackground)
local wordTileText = display.newText(wordTile,‘KA’, 0, 0, “Helvetica Neue”, 16 )
wordTileText:setReferencePoint( display.CenterReferencePoint )
wordTile:insert(wordTileText)
wordTileText.x,wordTileText.y = 31,11
wordTile.x,wordTile.y = 100,100

But if I use newImageRect, the text is no longer centered

local wordTile = display.newGroup();
local wordTileBackground = display.newImageRect(“tile.png”, 62, 31 )
wordTile:insert(wordTileBackground)
local wordTileText = display.newText(wordTile,‘KA’, 0, 0, “Helvetica Neue”, 16 )
wordTileText:setReferencePoint( display.CenterReferencePoint )
wordTile:insert(wordTileText)
wordTileText.x,wordTileText.y = 31,11
wordTile.x,wordTile.y = 100,100

Is there some gotcha with newImageRect I should be aware of?

I have the same problem with any other reference point alignment.

Thanks! [import]uid: 13836 topic_id: 27909 reply_id: 327909[/import]

Hmmm it seems that NewImage has the following properties once added to the group:

X Reference 0
Y Reference 0
X 31
Y 15.5

Whereas NewImageRect has

X Reference 0
Y Reference 0
X 0
Y 0

What is the reason for this? [import]uid: 13836 topic_id: 27909 reply_id: 112970[/import]