Ray nailed it mostly. You can (as of 5 minutes ago) clip from a source image in GWTCanvas. However, you will notice that GWTCanvas drawImage() expects a regular ImageElement.
ImageBundle uses background image slicing and other trickery that varies by browser. You can do some magic to tease the underlying DOM element out of an ImageBundle's AbstractImagePrototype for a specific image, but you have no guarantee as to what exactly that DOM element is. For example, on IE the DOM structure is totally different. What you could do is use GWTCanvas to clip out the actual image that the ImageBundle generator spits out. But you would need to first get a hold of it as a regular ImageElement which means knowing the URL to the image and loading it. If I am not mistaken that file is named according to its hash string (?), so you would need some means of grabbing the URL of the generated ImageBundle image. So in other words, you can't use GWTCanvas with ImageBundles or AbstractImagePrototype directly, BUT you can use it on an image that has been bundled together. -Jaime On Tue, Jan 20, 2009 at 4:15 PM, Ray Cromwell <cromwell...@gmail.com> wrote: > > I don't think you can, at least not easily. To do this requires the > drawImage() call which allows specifying the source rectangle. GWTCanvas > doesn't support clipping either, so you can't set a rectangle path, and clip > the source image. This might be due to a limitation of IE/VML, I dunno, I > try to stay away from VML. > -Ray > > On Tue, Jan 20, 2009 at 1:00 PM, Axel Kittenberger <axe...@gmail.com> wrote: >> >> Can I (and if yes how) use ImageBundle images in GWTCanvas.drawImage >> ()? >> >> Kind regards, >> Axel >> > > > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---