IanAppleby
02-10-2009, 05:44 PM
I'm attempting to implement a system for exporting images various components (based on canvas) by giving them each an alternative state "Print". The idea is to print any such componant by changing to the Print state, copying it's content with bitmap.draw, then returning it to it's previous state.
In princible this seems to work, but some layout changes appear to be slower than the rest of the updates, resulting in an image of the canvas mid state change.
It would appear the the StateChangeEvent.CURRENT_STATE_CHANGE event is fired before the layout is recalculated, and validateNow() doesn't appear to help.
How can I either:
1. Force the update to happen immidately or
2. listen for the real completion of the change?
In princible this seems to work, but some layout changes appear to be slower than the rest of the updates, resulting in an image of the canvas mid state change.
It would appear the the StateChangeEvent.CURRENT_STATE_CHANGE event is fired before the layout is recalculated, and validateNow() doesn't appear to help.
How can I either:
1. Force the update to happen immidately or
2. listen for the real completion of the change?