Christopher writes:
>
> From my experiments, that last example wont work.
>
> final Image image = new Image(mapResources.map());
>
> That line makes GWT try to use a sprite sheet, making the use
> style="background:" to display the image. Such an Image won't be shown
> when drawn on the canva
>From my experiments, that last example wont work.
final Image image = new Image(mapResources.map());
That line makes GWT try to use a sprite sheet, making the use
style="background:" to display the image. Such an Image won't be shown
when drawn on the canvas. I have to force gwt to use the src=
I've been looking into this same problem and what I've found is a
couple of issues.
First being that you are not loading the image (ie. not pulling the
image from the server), only setting the image properties (eg. url,
width, height, etc), so in order to do what you want you would have to
call th
I'll admit to knowing nothing about canvas work, but is it possible
you have to wait for the image to load using a LoadHandler before you
can display it in the Canvas?
On Feb 6, 10:46 am, Jambi wrote:
> Hej Thomas,
>
> it´s the same with your solution. The Image won´t appear on the
> canvas. Mayb
Hej Thomas,
it´s the same with your solution. The Image won´t appear on the
canvas. Maybe it is a bug since the canvas api is still experimental?
Maybe I should try a different approach to implement an image
preloader.
On Feb 6, 11:50 am, Thomas Broyer wrote:
> Or, without creating an Image widg
Or, without creating an Image widget:
AbstractImagePrototype.create(imageResource).createElement()
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe fr
Thank you for your quick response. At first I thougth it was going to
work, but the Image does not appear on the canvas. I tried this (as
you said):
Image map = new Image(mapResources.map());
contextMap.drawImage(ImageElement.as(map.getElement()), x, y);
On Feb 6, 2:47 am, Jeff Larsen wrote:
>
Have you tried
Image img = new Image(ClientBundle.getImageResource());
ImageElement.as(img.getElement());
Haven't tested this, but it is worth a try.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to
Hi there,
I´m playing around with the new Canvas API in GWT 2.2. Great stuff!
And I want to use a ClientBundle to get my Images for the Canvas, to
use it as some kind of image preloader. But the ClientBundle is giving
me ImageResource objects but I need ImageElement objects for the
Canvas.
This i