Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 489741

Summary: [GTK2] SWTGraphics returns an empty Clip Rectangle
Product: [Eclipse Project] Platform Reporter: Baha Elkassaby <baha.elkassaby>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P5 CC: akurtakov, nyssen, peter
Version: 4.6Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 530841    
Attachments:
Description Flags
Example to draw an SWT image none

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.