Bug 489741 - [GTK2] SWTGraphics returns an empty Clip Rectangle
Summary: [GTK2] SWTGraphics returns an empty Clip Rectangle
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 530841
  Show dependency tree
 
Reported: 2016-03-16 08:26 EDT by Baha Elkassaby CLA
Modified: 2018-07-12 10:15 EDT (History)
3 users (show)

See Also:


Attachments
Example to draw an SWT image (2.55 KB, text/x-java-source)
2016-03-16 08:26 EDT, Baha Elkassaby CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Baha Elkassaby CLA 2016-03-16 08:26:00 EDT
Created attachment 260339 [details]
Example to draw an SWT image

Hi,
on linux-GTK2 (rh6 with GTK 2.24), the clipping needs to be set on SWTGraphics so that it returns a non empty image that can be painted.
This is not necessary on Windows and Linux GTK3.
I'm not sure whether this is a SWT problem and then that bug should be moved to the platform bugs or if this is just a Draw2d problem.
Attached is an example snippet that demonstrates that bug if on linux with GTK2. To fix this, the clip Rectangle needs to be set (comment out line 67 to reproduce the bug: in that example, an empty image will be saved, if the setClip is done however, the image with the red cross will be saved).

Regards

baha
Comment 1 Alexander Nyßen CLA 2016-03-21 08:37:26 EDT
There is no platform specific code in Graphics or SWTGraphics. As such, this has to be an SWT problem.
Comment 2 Leo Ufimtsev CLA 2018-02-07 10:26:08 EST
Triaging Gtk2-only bugs. Please see Bug 530841 for details.
If this bug is not gtk2-specific, please indicate. (i.e, if action is required on Gtk3)
Thank you for your bug submission.
Comment 3 Eric Williams CLA 2018-07-10 13:57:57 EDT
Please note: GTK2 support for SWT is being dropped in Eclipse 4.10 / SimRel 2018-12 release. 

See the following mail for more info: http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg15783.html
Comment 4 Alexander Kurtakov CLA 2018-07-12 10:15:14 EDT
Marking the bug as wontfix as no work for GTK2 issues will happen. Please reopen if you still face the issue using GTK 3.x.