Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Off-screen drawing
Off-screen drawing [message #104717] Thu, 01 September 2005 13:30 Go to next message
Eclipse UserFriend
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 13: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 13:47 Go to previous message
Eclipse UserFriend
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: Thu Jul 17 20:02:32 EDT 2025

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

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

Back to the top