Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » [GC] Capture offscreen image
[GC] Capture offscreen image [message #449003] Mon, 17 January 2005 16:35
Arnaud is currently offline ArnaudFriend
Messages: 60
Registered: July 2009
Member
Hi !

I use this piece of code to capture shells or widgets and display the
image created in my app.

private static Image snapshot(Composite bean) {
GC gc = gc = new GC(bean);
final Image image = new Image(null, bean.getBounds().width,
bean.getBounds().height);
gc.copyArea(image, 0, 0);
gc.dispose();
return image;
}

Now that all works fine, I put the shell or widget to capture offscreen
(setLocation (-100, -100)) and what do I get ? A blank snapshot (or a
half blank / half widget snapshot if widget's width is more than 100).

So It seems that shells are not drawn when not on screen. Or are they
invisible ? Or do you have to use another method that GC.copyArea to get
capture ?

How can you make offscreen captures ?

TIA

--
Arnaud
Previous Topic:Any speed news for gtk?
Next Topic:Layout problem in 3.1?
Goto Forum:
  


Current Time: Wed Nov 13 10:16:32 GMT 2019

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

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

Back to the top