[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ve-dev] Re: how to add swt widgets to GEF?
|
No proplem.
Did you already checked out the Visual editor's sources from CVS? You
should do so. There you can find the screenshot mechanism it uses. The
respective classes do have the name "ImageCapture". You will notice, that
there are four of them. This is because the code for taking a screenshot
has to be specific for every operating system (os).
This is one of the very cool things in the ve's code: SWT widgets are only
rendered when they are visible for the user. This is because the rendering
needs many calculations, that are not neccessary when the widgets are
invisible. The shell where ve (and also you) wants to take the screenshots
from, runs in background and is never shown to the user. Therefore the
screenshots taken by the "normal" screenshot mechanism for SWT widgets
would give you only an empty Image. With using os specific code it is
possible to get the "screenshot" not from the screen but from the memory.
And so you can get a screenshot from an invisible SWT application. I think
it is also faster than the normal screenshot mechanism.
Am 08.07.2007, 08:50 Uhr, schrieb minghui liu <lmhf004@xxxxxxxxx>:
hi:
i am very sorry,
i want to catch the swt widgets's (for example : shell ) screenhots ,and
put
the screenhots into
the editor ,and editor can edit the screenhots .like the image in
gmail's
accessory.
i want to you to tell me :(take "shell" for example)
1. how to catch the "shell" 's screenhots
thanks .
lmh