Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Off-screen drawing
Off-screen drawing [message #104717] Thu, 01 September 2005 17:30 Go to next message
Jonathan Edwards is currently offline Jonathan EdwardsFriend
Messages: 27
Registered: July 2009
Junior Member
Is there any way in SWT to create a Shell or Display that is off-screen,
so that standard SWT controls draw to memory instead of the screen? For
example to create thumbnails in a visual builder.

I was forwarded here from the SWT newsgroup with the hint that there are
platform-specific solutions.

Thanks,
Jonathan
Re: Off-screen drawing [message #104736 is a reply to message #104717] Thu, 01 September 2005 17:47 Go to previous message
Eclipse UserFriend
Originally posted by: myersj.gmail.com

Hi Jonathan,

The Visual Editor uses this technique to grab images of SWT controls to
use within its design view. Unfortunately as you say, it requires
platform specific code.

Here's the code to do this on Windows:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ vm_swt/org/eclipse/ve/internal/swt/targetvm/win32/ImageCaptu re.java?rev=1.11&cvsroot=Tools_Project&content-type= text/vnd.viewcvs-markup

And on GTK:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ vm_swt/org/eclipse/ve/internal/swt/targetvm/unix/ImageCaptur e.java?rev=1.10&cvsroot=Tools_Project&content-type=t ext/vnd.viewcvs-markup

GTK requires the use of a native library to capture the image:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ os/linux/x86/?cvsroot=Tools_Project

As of yet the VE does not have code to accomplish this on OS X.

Hope this helps,
- Jeff

Jonathan Edwards wrote:
> Is there any way in SWT to create a Shell or Display that is off-screen,
> so that standard SWT controls draw to memory instead of the screen? For
> example to create thumbnails in a visual builder.
>
> I was forwarded here from the SWT newsgroup with the hint that there are
> platform-specific solutions.
>
> Thanks,
> Jonathan
Re: Off-screen drawing [message #610585 is a reply to message #104717] Thu, 01 September 2005 17:47 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 396
Registered: July 2009
Senior Member
Hi Jonathan,

The Visual Editor uses this technique to grab images of SWT controls to
use within its design view. Unfortunately as you say, it requires
platform specific code.

Here's the code to do this on Windows:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ vm_swt/org/eclipse/ve/internal/swt/targetvm/win32/ImageCaptu re.java?rev=1.11&cvsroot=Tools_Project&content-type= text/vnd.viewcvs-markup

And on GTK:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ vm_swt/org/eclipse/ve/internal/swt/targetvm/unix/ImageCaptur e.java?rev=1.10&cvsroot=Tools_Project&content-type=t ext/vnd.viewcvs-markup

GTK requires the use of a native library to capture the image:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.ve.swt/ os/linux/x86/?cvsroot=Tools_Project

As of yet the VE does not have code to accomplish this on OS X.

Hope this helps,
- Jeff

Jonathan Edwards wrote:
> Is there any way in SWT to create a Shell or Display that is off-screen,
> so that standard SWT controls draw to memory instead of the screen? For
> example to create thumbnails in a visual builder.
>
> I was forwarded here from the SWT newsgroup with the hint that there are
> platform-specific solutions.
>
> Thanks,
> Jonathan
Previous Topic:Off-screen drawing
Next Topic:Internal Error: Setup Java Visual Editor
Goto Forum:
  


Current Time: Tue Apr 16 11:30:58 GMT 2024

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

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

Back to the top