|
Re: print to image [message #49173 is a reply to message #49043] |
Thu, 12 December 2002 18:06 |
Eclipse User |
|
|
|
Originally posted by: hudsonr.us.eye-bee-em.com
We almost done with a PrintOperation, PrinterGraphics, and ScaledGraphics
class.
I would recommend waiting a few more days for this method of printing.
"Chris" <wibni@web.de> wrote in message news:3DF85F97.5070301@web.de...
> Hello,
> I want to print my contents. At first I painted it directly to the
> printer object with the discussed problems of getting tiny pictures.
> Then I read the posting where one gave the tip of printing the contents
> to an image, scale it and then send it to the printer. Here is what I
tried:
> ...
> Image tmpImage = new Image(null, 800, 600);
> GC tmpGC = new GC(tmpImage);
> SWTGraphics tmpGraphics = new SWTGraphics(tmpGC);
> ((GraphicalEditPart) getGraphicalViewer().getRootEditPart().getRoot())
> .getFigure().paint(tmpGraphics);
> // tmpImage has no ImageData (is still empty array),
> // so the rest has no effect
> ImageData tmpIData = tmpImage.getImageData().scaledTo(200, 400);
> tmpImage = new Image(null, tmpIData);
> tmpGC = new GC(tmpImage);
> tmpGraphics = new SWTGraphics(tmpGC);
> ...
>
> Does someone see an error here? How to print to an Image?
>
> Thanks,
>
> Chris
>
|
|
|
Re: print to image [message #49327 is a reply to message #49173] |
Thu, 12 December 2002 22:45 |
Dieter Moroff Messages: 24 Registered: July 2009 |
Junior Member |
|
|
Hi Randy,
that are great news! Is an export to the windows clipboard (in WMF-Format)
also in the pipe?
Dieter
"Randy Hudson" <hudsonr@us.eye-bee-em.com> schrieb im Newsbeitrag
news:ataj0m$mga$1@rogue.oti.com...
> We almost done with a PrintOperation, PrinterGraphics, and ScaledGraphics
> class.
> I would recommend waiting a few more days for this method of printing.
>
> "Chris" <wibni@web.de> wrote in message news:3DF85F97.5070301@web.de...
> > Hello,
> > I want to print my contents. At first I painted it directly to the
> > printer object with the discussed problems of getting tiny pictures.
> > Then I read the posting where one gave the tip of printing the contents
> > to an image, scale it and then send it to the printer. Here is what I
> tried:
> > ...
> > Image tmpImage = new Image(null, 800, 600);
> > GC tmpGC = new GC(tmpImage);
> > SWTGraphics tmpGraphics = new SWTGraphics(tmpGC);
> > ((GraphicalEditPart) getGraphicalViewer().getRootEditPart().getRoot())
> > .getFigure().paint(tmpGraphics);
> > // tmpImage has no ImageData (is still empty array),
> > // so the rest has no effect
> > ImageData tmpIData = tmpImage.getImageData().scaledTo(200, 400);
> > tmpImage = new Image(null, tmpIData);
> > tmpGC = new GC(tmpImage);
> > tmpGraphics = new SWTGraphics(tmpGC);
> > ...
> >
> > Does someone see an error here? How to print to an Image?
> >
> > Thanks,
> >
> > Chris
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.18040 seconds