I can tell I'm going to have lots of questions as I get more familiar with Gideros. It's a great product though.
Is there any way to "crop" a sprite? I have a sprite that contains other sprites. I'd like the child sprites to move within the parent but have them be able to move out of view, so to speak, by moving past the parent sprite's height, width, x, or y bounds. Imagine a window in a wall with someone walking past the window on the other side of the wall. In my specific case, I'm sliding one object down out of view while simultaneously sliding another one down into view.
Since the SceneManager already has an animation like this, I've been modifying it so it can be added to another sprite instead of the stage. I was hoping that sprites would keep their initial dimensions, but it appears from stepping through the SceneManager animation that as the two scenes move within my parent sprite the parent sprite's height is increasing. In my case, since the two scene's are the same size as the parent initially, I'm seeing each frame change the parent sprite's height to 2X, 3X, etc.
Is there a way to keep a sprite's dimensions from changing? I didn't see "setHeight()" or "setWidth()" methods in the Sprite.
The only options I can see right now are to either scrap this approach entirely and write my own animation -- probably involving some sort of scaling on the two child sprites -- or put some sort of full-screen overlay on the scene with transparent areas where I'm trying to move the child sprites. Since the locations of those areas aren't static and can be of variable size, that might not be easy.
Any thoughts?
Comments
Another way would be to use render to texture.
You can create the RenderTarget object with needed dimensions and render all the sprite hierarchy in it as needed.
I think I've come up with a "good enough" solution for now based on my idea of using SceneManager. I'm ignoring the issue above right now since it's really a bit of a distraction from what I was trying to accomplish. I just discovered it because I was using one of the existing "Move" translations to test my SceneManager modifications. For the real code, I needed to write a new translation function to create a single-axis rotating effect. I've done that and while it doesn't have the appropriate 3D perspective, it looks fairly good and probably good enough for my needs.
I described this more fully on my original question. The code for the new translations is posted there:
http://www.giderosmobile.com/forum/discussion/3775/is-it-possible-to-flip-a-sprite-with-a-3d-effect#Item_10
http://www.rasteredge.com/how-to/vb-net-imaging/crop-image/