ImageDataCollector / ScreenScraping [message #139420] |
Mon, 30 July 2007 11:19  |
Eclipse User |
|
|
|
hi all,
I would like to use VE ability to make a screenshot of a SWT composite
in my GMF Editor. When I looked at the implementation I noticed it is
very platform specific.
Basically I just need following method of
org.eclipse.ve.internal.swt.targetvm.ImageCapture:
protected abstract Image getImage(Control control, int maxWidth, int
maxHeight, boolean includeChildren);
even easier, "Image getImage(Control)" without children would be sufficient.
I found the OS branching stuff in
org.eclipse.ve.internal.swt.ImageDataCollector
looking like:
if (Platform.OS_WIN32.equals(Platform.getOS()))
dataCollectorType =
(...)("org.eclipse.ve.internal.swt.targetvm.win32.ImageCapture ");
else if (Platform.WS_GTK.equals(Platform.getWS())){
....
Is it a good approach to implement the branching stuff and copy the
three classes to make it work? (these classes are not exported in VE). I
also noticed that these classes are 2+ years old, is there already a
replacement?
Is it possible to do it this way? How would you suggest realizing it?
thanks & regards
stefan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: ImageDataCollector / ScreenScraping [message #616558 is a reply to message #140545] |
Fri, 14 September 2007 12:57  |
Eclipse User |
|
|
|
Philippe Ombredanne wrote:
>> Solution in VE is good enough.
>> Yes, it is platform specific, but there are no other way.
>
> Konstantin:
> Would you know of a better solution than good enough?
> Are ether flaws in the current one?
> What could be improved?
I have not looked in VE screen shot making precisely. I just know
that they use native code and it is known that ther are no other good
way. For Win32 you can use OS.SendMessage(), for Linux and Mac native
code is unavoidable.
> (from googling your name you seem to know more than a thing or two on the
> topic of visual editing, your help would matter a lot if you care for VE)
:-)
In reallity screen shot making is the simplest part of WYSIWYG GUI
editor.
|
|
|
|
Powered by
FUDForum. Page generated in 0.07832 seconds