[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Frequent update of image
|
Hi,
The typical way to do this is shown in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/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@xxxxxxxxxx> wrote in message
news:h88jcl$29b$1@xxxxxxxxxxxxxxxxxxxx
> 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
>
>
>