George Armhold wrote:
Thomas DeWeese wrote:
> I think the reason the canvas doesn't render is because it's size is > zero not because it isn't shown. If you set the canvas size (say to > 10x10 or something) before adding the document it should render.
Bingo! With this simple change my unit test now passes, no more deadlock. Is there any performance gain to be had by correctly predicting the eventual displayed size, vs specifying 10x10?
Yes, potentially. If you get the size right it should (in theory) be able to use the BufferedImage generated by the render directly (the new canvas should just 'pop up' essentially no wait).
The question is if something in the processes of getting reparented and computing a "new" display transform messes up and clears the current image. I it is worth trying, if it doesn't work it hopefully shouldn't be too hard to fix.
One word of caution, these buffered images can use up quite a bit of memory so you wouldn't want to do it for _lots_ of canvases but have 3 or 4 (with an appropriate JVM size) shouldn't be much of an issue.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
