|
|
|
|
Re: Capture Screen Shot of WorkSpace [message #787685 is a reply to message #787648] |
Tue, 31 January 2012 16:41   |
Eclipse User |
|
|
|
Hi Cole
I do not want to do in the browser.
I want to do sometihg like
// Take the snapshot into a display Image. This works very well in SWT.
Point size = myWidget.getSize();
Image image = new Image(display, size.x, size.y);
GC gc = new GC(myWidget);
gc.copyArea(image, 0, 0);
gc.dispose();
but in RAP, we do not have copyArea function.So what is the work around. I know i need to create the image like
private BufferedImage createImage() {
BufferedImage image = new BufferedImage( 200, 200, BufferedImage.TYPE_INT_ARGB );
Graphics2D gr2d = image.createGraphics();
// draw the image
gr2d.setColor( new Color( 0, 0, 255 ) );
gr2d.drawRect( 0, 0, widht - 1, height - 1 );
...
return image;
}
but how to draw the widgets on the image using gr2d???
I will appreciate for some pointers.
Thanks
Raj
|
|
|
Re: Capture Screen Shot of WorkSpace [message #787688 is a reply to message #787648] |
Tue, 31 January 2012 16:41   |
Eclipse User |
|
|
|
Hi Cole
I do not want to do in the browser.
I want to do sometihg like
// Take the snapshot into a display Image. This works very well in SWT.
Point size = myWidget.getSize();
Image image = new Image(display, size.x, size.y);
GC gc = new GC(myWidget);
gc.copyArea(image, 0, 0);
gc.dispose();
but in RAP, we do not have copyArea function.So what is the work around. I know i need to create the image like
private BufferedImage createImage() {
BufferedImage image = new BufferedImage( 200, 200, BufferedImage.TYPE_INT_ARGB );
Graphics2D gr2d = image.createGraphics();
// draw the image
gr2d.setColor( new Color( 0, 0, 255 ) );
gr2d.drawRect( 0, 0, widht - 1, height - 1 );
...
return image;
}
but how to draw the widgets on the image using gr2d???
I will appreciate for some pointers.
Thanks
Raj
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07703 seconds