[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Creating an Image

Create an image of the right size and tell the root figure of your diagram
to paint on that image (using a Graphics that delegates to a GC created for
that image).  Or you might be able to just have the control (FigureCanvas?)
paint on the image using a GC.

Keep in mind however that there are size restrictions (platform and hardware
dependent) on how big an image you can create.  Do you want to capture just
what's visible or the entire diagram?  If you want everything, you might
want to scale it down (using ScaledGraphics).

"Phil Williams" <phil.williams@xxxxxxxxxxxx> wrote in message
news:c787he$4t8$1@xxxxxxxxxxxxxx
> I asked this in the past, but have gotten no responses, so let me
rephrase:
>
> I would like to be able to create an action that can capture the diagram
> in a GEF editor to an image file (JPG, PNG, BMP, whatever).  I am at a
> loss as to how to start.
>
> Does anyone out there have any pointers or sample code to help me get
> started?
>
> Thanks in advance,
> Phil