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

Bug 315721

Summary: [GC] drawImage() produces fading borders on some browsers
Product: [RT] RAP Reporter: Niels Lippke <niels.lippke>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: tbuschto
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce
none
image used in snippet none

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.