Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » gc.drawImage()
gc.drawImage() [message #537651] Thu, 03 June 2010 09:23 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hi,

I am not sure, if the following is a browser feature or not:
If a use gc.drawImage() to draw a stretched image, this image is faded out near the left border.

Sample:
I have a small test image, here 7x34 px. And draw it up to a size of 200x100 pix using the following code:
public void createPartControl(Composite parent) {
  parent.setLayout(new FillLayout());		
  final Canvas c = new Canvas(parent, SWT.NONE);
  c.addPaintListener(new PaintListener() {

	public void paintControl(PaintEvent event) {
      	   GC gc = event.gc;
	   gc.drawImage(Graphics.getImage("images/test.png",   TestPart.class.getClassLoader().class.getClassLoader()), 0, 0, 7, 34, 0, 0, 200, 100);				
	}});
}


As result I see:
IE8: Fading near left border
FF3.6: Fading near right and left border
Safari: No fading
Opera: No fading

What is this? And how can I turn it off for all browsers?

Thanks,
Niels
Re: gc.drawImage() [message #537673 is a reply to message #537651] Thu, 03 June 2010 10:12 Go to previous messageGo to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Dies ist eine mehrteilige Nachricht im MIME-Format.

------=_NextPart_000_000F_01CB0316.01FDDF90
Content-Type: text/plain;
format=flowed;
charset="utf-8";
reply-type=response
Content-Transfer-Encoding: 7bit

Attached is an image showing the canvas in IE8.

"Niels Lippke" <niels.lippke@airpas.com> schrieb im Newsbeitrag
news:hu7sb6$val$1@build.eclipse.org...
> Hi,
> I am not sure, if the following is a browser feature or not:
> If a use gc.drawImage() to draw a stretched image, this image is faded out
> near the left border.
>
> Sample:
> I have a small test image, here 7x34 px. And draw it up to a size of
> 200x100 pix using the following code:
>
> public void createPartControl(Composite parent) {
> parent.setLayout(new FillLayout()); final Canvas c = new Canvas(parent,
> SWT.NONE);
> c.addPaintListener(new PaintListener() {
>
> public void paintControl(PaintEvent event) {
> GC gc = event.gc;
> gc.drawImage(Graphics.getImage("images/test.png",
> TestPart.class.getClassLoader().class.getClassLoader()), 0, 0, 7, 34, 0,
> 0, 200, 100); }});
> }
>
>
> As result I see:
> IE8: Fading near left border
> FF3.6: Fading near right and left border
> Safari: No fading
> Opera: No fading
> What is this? And how can I turn it off for all browsers?
>
> Thanks, Niels

------=_NextPart_000_000F_01CB0316.01FDDF90
Content-Type: image/png;
name="test.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="test.png"

iVBORw0KGgoAAAANSUhEUgAAANcAAABoCAIAAADtg/JCAAAE3UlEQVR4nO3d QXLbSAyF4Qegs/IB
ku2kyvc/g0/lKtsNzAJqqinJFjmWBlHqfQuHomRaMv805aTKkJeXl4/39947 RLz3AMIdAICI8AhE
iEhEgB7Qcu5ERERyA4CqyqCqAEQ1d5qqqFpum4lqM1NVNTvcZZa3VjdVMX0u RJ6enjY+yQbg9fXV
3QPw3iMin3QM+ThW+KCywiVBjBxPKjz8oSoiKqJmGVlW6CM7N1MzdzeziAhV NUPmEaFmueHuorr9
STYswa3LY4V/jYvnbt552I7IXo97M4A49cUXysdjOcg2O4IluhNWSPVYIdVj hVSPFVI9Vkj1WCHV
Y4VUjxVSPVZI9Vgh1WOFVI8VUj1WSPVYIdVjhVSPFVI9Vkj1WCHVY4VUjxVS PVZI9Vgh1WOFVI8V
Uj1WSPVYIdVjhVSPFVI9Vkj1WCHVY4VUjxVSPVZI9Vgh1WOFVI8VUj1WSPVY IdVjhVSPFVI9Vkj1
WCHVY4VUjxVSPVZI9Y6TaVE3mXbfGNMdx73XgR/GfNZyYOzy8eSu/LjsX7bn ncuDT/Z89uU2+yMq
pHvJU3myZ5zfad9xPvLJpOzDfOSzHm6rAei9uzsiuvvpYOb5leQz+N4Cs+OT 5dtLGdfCCBGJnA8P
5Coo4ywss+IBiKq6BxAiFyp0D5Gzad0XpndHhOxPtQH4+Pi4VYVXT/v30/rs uBf27XlwsfusMTFm
v68+Rsi4Kx3Syc6AGN+fJV8XOTabslqRGBfoGN/wYyqbNQAf7+/uHhHunhvL 3wacXZS/zuh6ZLty
2Y4VXj7qpQpHRUtPppp7VFUjVCQiNEJVESGqAAzrDt0911ERH4f1PMp/Wwvf 3t5OK1yvsRhRXo3s
lkvdrmPdKe4Hd7XC40dVFTEzNVMRa83cVTXc1Qwn12hMZ2eqMB9/WCD3aADe 3t+994jovX9xvd9S
4S39r1/sr5UXXFXFZxXmWjgqNDNVtd7VrJl5a9q7u7fWVhVOby77nLhqLpO6 5+yN94Wjwqtr4f7l
liqdV3i+CrouV+PwiNyw8W7PzOZLce89Kxb3w5XZXUT0ZOnaW+HF9e+ztZAV Ppb5lE1X0Wn1mt66
HH5YAVxVIlZhrZenmH+EPc8F+/+9cMvLOHkB9Cguvi9c/aAx/5NNntzceXag 5YAyX9rnzx33zI/f
oiH/NkyH/c5rpj/N9Qo3OsnjpqHw/5GpHiukeqyQ6rFCqscKqR4rpHqskOqx QqrHCqkeK6R6rJDq
sUKqxwqpHiukeqyQ6rFCqscKqR4rpHqskOqxQqrHCqkeK6R6rJDqsUKqxwqp HiukeqyQ6rFCqscK
qR4rpHqskOqxQqrHCqkeK6R6rJDqsUKq1zD91uzPfrt67uSMiUc0j2j4zm9X /+zgGx/5tQbg6ekp
B1V09xy/gzHgxJcZJ9MkC3ogIhJADtLRMXUHIsfJOzkBz0xF1CzH7zQzPUyB OvjRmrXWWlPV1pq1
9mNs65gYlUQkB/Vsf5INwM9fv7Kz7h7u88CnucL7fJfo7uYKY72AqQiywrxp lnVmU5J1jpvLfLIl
zcP+1nSa57hsbH+GDcA/v38vna2n90zjRlnhI8sVcR6cJKrLTV0P0cGYUrZs rGY3iiBXuzGBEeMe
rBPf/vQagOfn55u+ZKJ9+DMy1WOFVI8VUr1/AZBioofjQugsAAAAAElFTkSu QmCC

------=_NextPart_000_000F_01CB0316.01FDDF90--
Re: gc.drawImage() [message #537809 is a reply to message #537673] Thu, 03 June 2010 17:18 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Nils,

as the behaviour is inconsistent among different browsers it looks like
a bug. Though I am not sure I anything can be done about it, feel free
to file a bugzilla.

Rüdiger

On 03.06.2010 12:12, Niels Lippke wrote:
> Attached is an image showing the canvas in IE8.
>
> "Niels Lippke" <niels.lippke@airpas.com> schrieb im Newsbeitrag
> news:hu7sb6$val$1@build.eclipse.org...
>> Hi,
>> I am not sure, if the following is a browser feature or not:
>> If a use gc.drawImage() to draw a stretched image, this image is faded
>> out near the left border.
>>
>> Sample:
>> I have a small test image, here 7x34 px. And draw it up to a size of
>> 200x100 pix using the following code:
>>
>> public void createPartControl(Composite parent) {
>> parent.setLayout(new FillLayout()); final Canvas c = new
>> Canvas(parent, SWT.NONE);
>> c.addPaintListener(new PaintListener() {
>>
>> public void paintControl(PaintEvent event) {
>> GC gc = event.gc;
>> gc.drawImage(Graphics.getImage("images/test.png",
>> TestPart.class.getClassLoader().class.getClassLoader()), 0, 0, 7, 34,
>> 0, 0, 200, 100); }});
>> }
>>
>>
>> As result I see:
>> IE8: Fading near left border
>> FF3.6: Fading near right and left border
>> Safari: No fading
>> Opera: No fading
>> What is this? And how can I turn it off for all browsers?
>>
>> Thanks, Niels


--
Rüdiger Herrmann
http://eclipsesource.com
Re: gc.drawImage() [message #537908 is a reply to message #537809] Fri, 04 June 2010 07:07 Go to previous message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Bug #315721

I looks like only FF and IE show that behaviour. Safari, Chrome, Opera work
as expected.

Thanks, Niels
Previous Topic:DateTime-Widget not reliable
Next Topic:[design] ViewStackPresentation question
Goto Forum:
  


Current Time: Thu Apr 25 12:02:57 GMT 2024

Powered by FUDForum. Page generated in 0.03284 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top