pombreda / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 0 forks source link

Canvas missing obvious function #200

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of gwt and gwt-incubator are you using?

Latest trunk as at 30 Nov 08

What OS and browser are you using?

Windows (browser is irrelevant)

Do you see this error in hosted mode, web mode, or both?

Both

(If possible, please include a test case that shows the problem)

Hopefully using the test case you have generously provided, what steps will 
reproduce the problem? 

Although the underlying DrawImage method allows scaling on the fly, or 
viewing a sub-section of an image, it is not exposed in the interface. i.e. 
the method:

  public void drawImage(ImageElement img, double sourceX, double sourceY,
      double sourceWidth, double sourceHeight, double destX, double destY,
      double destWidth, double destHeight)

is not brought out in the interface, which looks like a simple omission. 
You expose two dumbed-down versions of the interface which interpose fixed 
constraints on the source image. These unnecessarily (as far as I can see) 
limit the native functionality.

The fix is to add the call to the source as the underlying impl function 
already expects those parameters.

Workaround if you have one:

None - you have to fix the code as the impl is a private member.

Original issue reported on code.google.com by kgrumb...@gmail.com on 1 Dec 2008 at 12:37

GoogleCodeExporter commented 9 years ago

Original comment by ecc%google.com@gtempaccount.com on 1 Dec 2008 at 5:40

GoogleCodeExporter commented 9 years ago
Yes. This should be exposed. I will try to land a patch shortly.

In the mean time, you can check out the incubator source and work against that.

Original comment by jaime...@google.com on 1 Dec 2008 at 6:21

GoogleCodeExporter commented 9 years ago
Yes, I simply patched the incubator source to include the call and it works as 
expected.

Original comment by kgrumb...@gmail.com on 5 Dec 2008 at 4:56

GoogleCodeExporter commented 9 years ago
This particular patch is a trivial one for us to add. But in the future, if you 
have any patches to GWTCanvas, 
please feel free to upstream them.

Contributions are more than welcome :). Thanks for the feedback!

Original comment by jaime...@gmail.com on 5 Dec 2008 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by jaime...@google.com on 2 Mar 2009 at 4:35