Skip to main content



      Home
Home » Eclipse Projects » GEF » How to print the editor output in an image file
How to print the editor output in an image file [message #147744] Mon, 16 August 2004 11:44 Go to next message
Eclipse UserFriend
Originally posted by: gupolet.ulb.ac.be

Hi,

I was wondering if it was possible to print the GEF editor output in an
image file? I haven't seen this in the examples and I couldn't find what
function might do that in the doc. If anyone has any knowledge about this...

Thank you very much

Guillaume
Re: How to print the editor output in an image file [message #147760 is a reply to message #147744] Mon, 16 August 2004 12:11 Go to previous message
Eclipse UserFriend
There's no function that'll do it for you, but it should be fairly simple to
do. Create an image and ask the root figure to paint on it. Something like
this:

Image img = new Image(null, fig.getPreferredSize().width,
fig.getPreferredSize().height);

GC gc = new GC(img);

Graphics graphics = new SWTGraphics(gc);

fig.paint(graphics);

graphics.dispose();

gc.dispose();


"Guillaume Polet" <gupolet@ulb.ac.be> wrote in message
news:cfqkkl$99f$1@eclipse.org...
> Hi,
>
> I was wondering if it was possible to print the GEF editor output in an
> image file? I haven't seen this in the examples and I couldn't find what
> function might do that in the doc. If anyone has any knowledge about
this...
>
> Thank you very much
>
> Guillaume
>
>
Previous Topic:ResizableEditPolicy, what integer parameter do I use for setResizeDirections()?
Next Topic:FlowLayout with Resizable Editparts
Goto Forum:
  


Current Time: Mon Jun 02 21:46:03 EDT 2025

Powered by FUDForum. Page generated in 0.02558 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top