| Summary: | [GC] drawImage() produces fading borders on some browsers | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Niels Lippke <niels.lippke> | ||||||
| Component: | RWT | Assignee: | 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: |
|
||||||||
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. 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);
}});
}
If it still doesn't work for you, feel free to close it again. Thanks, Niels This is very old issue which can't be reproduced with the latest, supported by RAP browsers. |
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