Page 1 of 1

Canvas - Create, Destroy, Save, Resize?

PostPosted: Fri Oct 07, 2011 10:48 pm
by EvanBlack
When destroying an actor does the Destroy Actor Events happen before or after the actor is actually destroyed?

I have I canvas. I want to save the canvas before the actor is destroyed. Can I save the canvas when the canvas is destroyed?

Also, can I resize a canvas?

Does each canvas clone save its own canvas? And when loading the canvas does it load its own canvas?

If I wanted to create a canvas clone of a specific size could I?

If resizing is possible, when I load the saved canvas how does it draw the image to the new resized canvas?
Ok I answered this one myself with searching around. While you can't resize the canvas, you can make the canvas appear as if it was resized. Thanks search function.

If I wanted the canvas to check for a saved version when its created how would I avoid errors if there isn't a save?

Can I save a canvas to a file? (Curious more than necessary)

A lot of these I could probably figure out on my own but some I just don't know if they are possible or how I would go about testing its possibility. Being able to do these things would make what I need very easy.

Re: Canvas - Create, Destroy, Save, Resize?

PostPosted: Fri Oct 07, 2011 11:11 pm
by skydereign
Unlike the CreateActor, the DestroyActor event happens after the event (but it happens after the draw events).

You cannot resize canvas actors, or any other frame actors in game. You cannot set the size of a canvas actor, and due to a bug you should not clone canvas actors (they draw the same thing as if they are the same canvas). The only way you can save a canvas is through savecanvas (unless you record the canvas in a giant array). You can search for canvas bmp to find stuff on that.