Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315721 - [GC] drawImage() produces fading borders on some browsers
Summary: [GC] drawImage() produces fading borders on some browsers
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 03:01 EDT by Niels Lippke CLA
Modified: 2016-11-04 04:54 EDT (History)
1 user (show)

See Also:


Attachments
Snippet to reproduce (359 bytes, text/plain)
2010-06-04 03:01 EDT, Niels Lippke CLA
no flags Details
image used in snippet (293 bytes, image/png)
2010-07-01 03:44 EDT, Niels Lippke CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niels Lippke CLA 2010-06-04 03:01:18 EDT
Created attachment 171070 [details]
Snippet to reproduce

If you use gc.drawImage() to draw a stretched image, this image is faded out near the left border (becomes transparent) on FF and IE.

In the snippet I have a small test image, here 8x40 px and stretch it to a size of 200x100 pix.

As result I see:
IE8: Fading around borders
FF3.6: Fading around borders
Safari: No fading
Opera: No fading 
Chrome: No fading
Comment 1 Tim Buschtoens CLA 2010-06-30 11:15:34 EDT
I can reproduce this problem only in FF, not IE. There it is a bug in the antialiasing of the canvas-element. We have no way to fix this as long as we use this technology for GC.

Should you find a way for me to reproduce the bug in IE (perhaps its related to the image you use), feel free to reopen the bug.
Comment 2 Niels Lippke CLA 2010-07-01 03:44:46 EDT
Created attachment 173167 [details]
image used in snippet


The following code as part of a View produces sort of fading in IE. The fading gets even bigger, if the view is maximized.

public void createPartControl(Composite parent) {	
   parent.setLayout(new FillLayout());		
   final Canvas c = new Canvas(parent, SWT.NONE);
   c.addPaintListener(new PaintListener() {

	@Override
	public void paintControl(PaintEvent event) {
  	  GC gc = event.gc;				    
          gc.drawImage(Graphics.getImage("images/selected_bc.png",  
          ListTestPart.class.getClassLoader())
	       , 0, 0, 19, 38, 0, 0, c.getBounds().width, c.getBounds().height);				
   }});
}
Comment 3 Niels Lippke CLA 2010-07-01 03:46:57 EDT
If it still doesn't work for you, feel free to close it again.
Thanks,
Niels
Comment 4 Ivan Furnadjiev CLA 2016-11-04 04:54:48 EDT
This is very old issue which can't be reproduced with the latest, supported by RAP browsers.