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

Bug 430846

Summary: GC.drawImage(Image, int, int, int, int, int, int, int, int) not work properly except source area is not attached to corners of image.
Product: [Eclipse Project] Platform Reporter: Jeeeyul Lee <jeeeyul>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, sravankumarl
Version: 4.4Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Shows
none
Expected Result
none
Actual Result on Linux none

Description Jeeeyul Lee CLA 2014-03-20 20:31:22 EDT
Created attachment 241079 [details]
Shows

GC.drawImage(Image, int, int, int, int, int, int, int, int) not work properly except source area is not attached to corners of image.

When source area is top-left, top-right, bottom-left, bottom-right corner of given image, it works well. However, in the other cases source area is not honored.

I tested same code with windows, osx, linux-gtk.
Only linux-gtk doesn't work as that I intended.

Attachement shows this problem.
Left red box is original image, and right one is some kind of 9-patch.
You can see only corners are rendered properly.
Comment 1 Jeeeyul Lee CLA 2014-03-21 05:57:30 EDT
It is the reason that why trim stack image border is broken in Linux.
Comment 2 Sravan Kumar Lakkimsetti CLA 2014-03-24 01:29:33 EDT
Hi,

Can you please add the sample snippet to reproduce this problem?

Thanks
Sravan
Comment 3 Jeeeyul Lee CLA 2014-03-26 22:38:07 EDT
Created attachment 241295 [details]
Expected Result
Comment 4 Jeeeyul Lee CLA 2014-03-26 22:38:43 EDT
Created attachment 241296 [details]
Actual Result on Linux
Comment 5 Jeeeyul Lee CLA 2014-03-26 22:39:53 EDT
I created a gist https://gist.github.com/jeeeyul/9798697
The result of gist should have to be https://bugs.eclipse.org/bugs/attachment.cgi?id=241295

However it looks like https://bugs.eclipse.org/bugs/attachment.cgi?id=241296

All other platforms results as expected.
Comment 6 Sravan Kumar Lakkimsetti CLA 2014-04-15 05:31:06 EDT
(In reply to Jeeeyul Lee from comment #5)
> I created a gist https://gist.github.com/jeeeyul/9798697
> The result of gist should have to be
> https://bugs.eclipse.org/bugs/attachment.cgi?id=241295
> 
> However it looks like https://bugs.eclipse.org/bugs/attachment.cgi?id=241296
> 
> All other platforms results as expected.

Hi,

I tried with the above snippet with the latest version of eclipse with gtk 3.8 on RHEL 7 and ubuntu 13.10. But I am not able to reproduce the problem. Can you please suggest me how to reproduce?

thanks
Sravan
Comment 7 Eric Williams CLA 2018-05-11 14:17:27 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #6)
> (In reply to Jeeeyul Lee from comment #5)
> > I created a gist https://gist.github.com/jeeeyul/9798697
> > The result of gist should have to be
> > https://bugs.eclipse.org/bugs/attachment.cgi?id=241295
> > 
> > However it looks like https://bugs.eclipse.org/bugs/attachment.cgi?id=241296
> > 
> > All other platforms results as expected.
> 
> Hi,
> 
> I tried with the above snippet with the latest version of eclipse with gtk
> 3.8 on RHEL 7 and ubuntu 13.10. But I am not able to reproduce the problem.
> Can you please suggest me how to reproduce?
> 
> thanks
> Sravan

I also cannot reproduce the issue on Fedora 28, 4.8 M7, and GTK3.22.