newContainer() only from the center?

I’m looking into containers, and I am finding them a bit frustrating to work with, but I don’t know if that is because I am misunderstanding how they work, or if it is a lack of functionality.

What I want is a container of width and height, where the top and left of the container are at coordinates 0, 0.

It seems to me a container only functions from its own center, regardless of the anchor point.

IE if I create a container with width of 200 and height 100, then the ranges within it are -100, -50 to 100, 50, whereas what I’d want is 0, 0 to 200, 100 (which would actually bring it more into line with display groups - after all they are an enhanced display group, NOT a variety on an image).

Am I doing something wrong or missing something?

Because so far, every single time I create a container, I have to create a pair of nested groups to offset this issue and make it so I am placing my items into it logically (with 0, 0 being top left of the container). And, of course I also have to position the container to x + width / 2 and y + height / 2.

I should add - I was expecting to be able to just change display.newGroup() to display.newContainer( width, height ), but as it stands it requires a laaaaarge amount of work to make the change.

Having it as display.newContainer( x, y, width, height ) (even if offset by the anchor to keep it in line with other graphics 2.0).

You can set the anchor point to (0,0) to make it top-left aligned.

By default, containers have their anchorChildren property set to true. You can set it to ‘false’, and then only the clip bounds move:

http://docs.coronalabs.com/tachyon/guide/graphics/container.html

I shall look into this tomorrow - cheers for pointing this out I didn’t see that option.

I should add - I was expecting to be able to just change display.newGroup() to display.newContainer( width, height ), but as it stands it requires a laaaaarge amount of work to make the change.

Having it as display.newContainer( x, y, width, height ) (even if offset by the anchor to keep it in line with other graphics 2.0).

You can set the anchor point to (0,0) to make it top-left aligned.

By default, containers have their anchorChildren property set to true. You can set it to ‘false’, and then only the clip bounds move:

http://docs.coronalabs.com/tachyon/guide/graphics/container.html

I shall look into this tomorrow - cheers for pointing this out I didn’t see that option.