Posted 02 July 2006 - 04:02 PM
Yeh, sorry I sdidn't put in many details, I tend to commit that mistake.
I am creating a program that generates diagrams from code inputs given by the user (similar to xml, but less complex. It creates entities and relations between them).
The image is generated through a rendering algorithm a friend made, and stored into the swt canvas. But the rendering algorithm doesn't arrange the elements, it just throw 'em all over each other, and the user has to rearrange the image. When he finishes that process, he should be able to export that image to a known format file, like jpg.
The problem I bumped into is that the image generated is stored into a swt canvas, and I managed to make an awt algorithm to get it, but they are not complatible, so I am kinda stuck again. I tried using swt methods, but it seems I am not able to understand how it works very much, so I am unable to make it using only swt.
If anyone knows a way to export the image stored in a swt canvas, or to transform the canvas to swt, or a way to get the content, it would be great.