Thomas Broyer has uploaded a new change for review.

  https://gwt-review.googlesource.com/3421


Change subject: Add drawImage(VideoElement, …) overloads
......................................................................

Add drawImage(VideoElement, …) overloads

Bug: issue 8192
Change-Id: I31012c21053d0e8219b731ff547ecb9c7364854a
---
M user/src/com/google/gwt/canvas/dom/client/Context2d.java
1 file changed, 44 insertions(+), 0 deletions(-)



diff --git a/user/src/com/google/gwt/canvas/dom/client/Context2d.java b/user/src/com/google/gwt/canvas/dom/client/Context2d.java
index 0be7e00..d7128db 100644
--- a/user/src/com/google/gwt/canvas/dom/client/Context2d.java
+++ b/user/src/com/google/gwt/canvas/dom/client/Context2d.java
@@ -19,6 +19,7 @@
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.dom.client.CanvasElement;
 import com.google.gwt.dom.client.ImageElement;
+import com.google.gwt.dom.client.VideoElement;

 /**
  * Rendering interface used to draw on a {@link CanvasElement}.
@@ -504,6 +505,49 @@
   }-*/;

   /**
+   * Draws a video's current frame.
+   *
+   * @param image a {@link VideoElement} object
+ * @param dx the x coordinate of the upper-left corner of the destination rectangle + * @param dy the y coordinate of the upper-left corner of the destination rectangle
+   */
+ public final native void drawImage(VideoElement image, double dx, double dy) /*-{
+    this.drawImage(image, dx, dy);
+  }-*/;
+
+  /**
+   * Draws a scaled video's current frame.
+   *
+   * @param image a {@link VideoElement} object
+ * @param dx the x coordinate of the upper-left corner of the destination rectangle + * @param dy the y coordinate of the upper-left corner of the destination rectangle
+   * @param dw the width of the destination rectangle
+   * @param dh the height of the destination rectangle
+   */
+ public final native void drawImage(VideoElement image, double dx, double dy, double dw,
+      double dh) /*-{
+    this.drawImage(image, dx, dy, dw, dh);
+  }-*/;
+
+  /**
+   * Draws a scaled subset of a video's current frame.
+   *
+   * @param image a {@link VideoElement} object
+ * @param sx the x coordinate of the upper-left corner of the source rectangle + * @param sy the y coordinate of the upper-left corner of the source rectangle
+   * @param sw the width of the source rectangle
+   * @param sh the width of the source rectangle
+ * @param dx the x coordinate of the upper-left corner of the destination rectangle + * @param dy the y coordinate of the upper-left corner of the destination rectangle
+   * @param dw the width of the destination rectangle
+   * @param dh the height of the destination rectangle
+   */
+ public final native void drawImage(VideoElement image, double sx, double sy, double sw, double sh,
+      double dx, double dy, double dw, double dh) /*-{
+    this.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
+  }-*/;
+
+  /**
    * Fills the current path.
    */
   public final native void fill() /*-{

--
To view, visit https://gwt-review.googlesource.com/3421
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31012c21053d0e8219b731ff547ecb9c7364854a
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Thomas Broyer <[email protected]>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to