|
|
Re: Capture Screen Shot of WorkSpace [message #787644 is a reply to message #787605] |
Tue, 31 January 2012 20:43 |
|
It sounds like what you are interested in is taking a screenshot of the RAP application itself. If that is the case, it simply is not possible in a web browser. Here is a good discussion over at StackOverflow[1]. Since RAP runs as HTML and Javascript in the browser, the discussion applies to RAP as well.
[1] http://stackoverflow.com/questions/1794719/capture-screenshot-of-website-on-the-client-javascript-or-flash
Cole
|
|
|
Re: Capture Screen Shot of WorkSpace [message #787648 is a reply to message #787605] |
Tue, 31 January 2012 20:44 |
|
It sounds like what you are interested in is taking a screenshot of the RAP application itself. If that is the case, it simply is not possible in a web browser. Here is a good discussion over at StackOverflow[1]. Since RAP runs as HTML and Javascript in the browser, the discussion applies to RAP as well.
[1] http://stackoverflow.com/questions/1794719/capture-screenshot-of-website-on-the-client-javascript-or-flash
Cole
|
|
|
Re: Capture Screen Shot of WorkSpace [message #787685 is a reply to message #787648] |
Tue, 31 January 2012 21:41 |
Raj Messages: 74 Registered: August 2011 |
Member |
|
|
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 21:41 |
Raj Messages: 67 Registered: July 2009 |
Member |
|
|
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.04222 seconds