Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15: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 16:11 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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: Sat Jul 27 18:30:47 GMT 2024

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

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

Back to the top