Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [gef-dev] Drawing into an AWT Image

:: Hi,
:: 
:: I would like to use GEF (more precisely: draw2d, rendering 
:: only) from a web client, and for that I need to be able to 
:: render into an AWT image... Is that possible somehow? I 
:: can't find a way to do that.

It would be enough for me to be able to save the image into a binary
stream.

To achive that I've tried to pump the draw2d drawing into an SWT
ImageLoader (with some AspectJ magic because it's missing the required
methods) but then I slowly realized that if I use GC then I will get
platform specific... is that so?

I don't understand enough about SWT and draw2d yet, but isn't it
possible to implement an interface (either a draw2d or SWT one) and have
draw2d draw on that graphics? That way I could stay platform
independent, and maybe SWT independent by implementing the required
drawing primitives with plain java AWT.

I can see an abstract Graphics class in draw2d, is it possible to
implement it's functionality with an AWT Graphics? Will try tomorrow
unless someone warns that it's pointless...

And I seem to remember something that SWT has a platform independent
implementation, that is based on AWT. Is that true?

Anyways, please help me with some guidance how could I use the cool
draw2d functionality, render it into a binary stream or an AWT Image and
stay platform independent if possible. Some coding is not a problem if
someone can give me the bird's view...

thanks in advance, and sorry for the flood of questions... :)

- 101


Back to the top