This patch does a formatting pass on related files and exposes an new overload for drawImage().
The API addition is as follows: /** * Draws an input image at a given position on the canvas. Resizes image * according to specified width and height and samples from the specified * sourceY and sourceX. * * <p> * We recommend that the pixel and coordinate spaces be the same to provide * consistent positioning and scaling results * </p> * * @param img the image to be drawn * @param sourceX the start X position in the source image * @param sourceY the start Y position in the source image * @param sourceWidth the width in the source image you want to sample * @param sourceHeight the height in the source image you want to sample * @param destX the start X position in the destination image * @param destY the start Y position in the destination image * @param destWidth the width of drawn image in the destination * @param destHeight the height of the drawn image in the destination */ public void drawImage(ImageElement img, double sourceX, double sourceY, double sourceWidth, double sourceHeight, double destX, double destY, double destWidth, double destHeight); ========= The functionality was already there in the impl, I just had not exposed it in the public facing API. I also include a small example invocation in one of the demo samples. The diff looks larger than it should be because of the needed formatting pass ;). Affected Files (Incubator): M src/com/google/gwt/demos/gwtcanvas/client/LogoDemo.java M src/com/google/gwt/widgetideas/graphics/client/GWTCanvas.java -Jaime --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
gwtcanvas_drawImage_r1404.patch
Description: Binary data