Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Frequent update of image
Frequent update of image [message #484895] Wed, 09 September 2009 15:59 Go to next message
Markus is currently offline MarkusFriend
Messages: 52
Registered: July 2009
Member
Hi all,

I need to update parts of an image rather frequent. The image updates are generated with input from a 3rd party
hardware.
The update frequency might be as high as 30 times per seconds and the upate area is approx 400 x 500 pixels

We have managed to do this with native c++ code using a graphical open source lib, but we want to move this into
Eclipse.
So my question is basiclly how to do this with SWT? Separate thread for update, doing this with a native DLL etc.


// Markus
Re: Frequent update of image [message #485418 is a reply to message #484895] Fri, 11 September 2009 16:48 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

The typical way to do this is shown in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet275.java?view=co .
To make it a bit more applicable to your case:
- change the INTERVAL to a value like 33
- change the Canvas style from SWT.NONE to SWT.NO_BACKGROUND
- change canvas.redraw()'s bounds from extent.x, extent.y to 400, 500

This should give you a quick way to determine if this approach will be able
to keep up with your incoming image changes or not. If not then please
follow up here and I can look a bit further into alternatives. Writing some
native code could give increased performance, but I haven't heard of others
doing this before. There could be swt/OS interaction problems with this
approach since swt assumes that you aren't using its native handles for
other things behind its back.

HTH,
Grant


"Markus" <markusm@hangso.edu> wrote in message
news:h88jcl$29b$1@build.eclipse.org...
> Hi all,
>
> I need to update parts of an image rather frequent. The image updates are
generated with input from a 3rd party
> hardware.
> The update frequency might be as high as 30 times per seconds and the
upate area is approx 400 x 500 pixels
>
> We have managed to do this with native c++ code using a graphical open
source lib, but we want to move this into
> Eclipse.
> So my question is basiclly how to do this with SWT? Separate thread for
update, doing this with a native DLL etc.
>
>
> // Markus
>
>
>
Previous Topic:restrict Composite size
Next Topic:Why does the StyledCellLabelProvider.update() method repeat the 1st column text?
Goto Forum:
  


Current Time: Thu Apr 18 22:14:43 GMT 2024

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

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

Back to the top