setBounds for DisplayObject?

I was looking at Tilemap where you can apparently set the boundaries for the DisplayObject.
Looking at the source I guess it will only work for Flash?
It would be nice if I don’t have to mask what I don’t want rendered in the first place…

Did you try scrollRect?

I had given up on that. Had some very strange (HTML5) rendering problems I seem to remember.
It works now though… (except for DOM, but then again. mask doesn’t work either).
Still, I don’t need to scroll, so it’s a bit of a strange misuse.
Then there is the Tilemap constructor, that basically does nothing with width/height (unless Flash).
I like the idea of maybe having better performance if a DisplayObject(Container) is clipped/scissored to begin with.

Adobe’s documentation makes it sound intentional (it actually mentions cropping before scrolling), but I agree that it seems weird. This is why naming is so important: names affect how you think about things, and a poorly-chosen name leads to false assumptions.

I believe you can scroll the object using the x and y properties of the rectangle. Theoretically, a scroller could be implemented only by updating the scrollRect of a large display object

On software targets (canvas, Cairo, Flash) the width/height does determine the Tilemap size. We should probably use a scissor to clip the boundaries on the GL renderer to be consistent.

The width/height also affects the mouse hit behavior.

Why not have the same kind of option (in the constructor) for all the DisplayObject(Container)s?
(0, 0) would mean parent size (as it does for window). Otherwise clip it.
Now often I have a sprite as a container, and if it’s smaller I have to mask/scrollRect it.

OpenFL tries not to change the Flash API, and the Flash API doesn’t include clipping in the constructor.