java.lang.Object | ||||
↳ | com.google.gwt.user.client.ui.UIObject | |||
↳ | com.google.gwt.user.client.ui.Widget | |||
↳ | com.google.gwt.user.client.ui.FocusWidget | |||
↳ | com.google.gwt.canvas.client.Canvas |
A widget representing a <canvas> element.
Experimental API: This API is still under development and is subject to change.
This widget may not be supported on all browsers.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a new
Canvas if supported, and null otherwise. | |||||||||||
Returns the attached Canvas Element.
| |||||||||||
Gets the rendering context that may be used to draw on this canvas.
| |||||||||||
Returns a 2D rendering context.
| |||||||||||
Gets the height of the internal canvas coordinate space.
| |||||||||||
Gets the width of the internal canvas coordinate space.
| |||||||||||
Runtime check for whether the canvas element is supported in this browser.
| |||||||||||
Sets the height of the internal canvas coordinate space.
| |||||||||||
Sets the width of the internal canvas coordinate space.
| |||||||||||
Returns a data URL for the current content of the canvas element.
| |||||||||||
Returns a data URL for the current content of the canvas element, with a
specified type.
|
Returns the attached Canvas Element.
Gets the rendering context that may be used to draw on this canvas.
contextId | the context id as a String |
---|
Returns a 2D rendering context.
This is a convenience method, see getContext(String)
.
Gets the height of the internal canvas coordinate space.
Gets the width of the internal canvas coordinate space.
Runtime check for whether the canvas element is supported in this browser.
Sets the height of the internal canvas coordinate space.
height | the height, in pixels |
---|
Sets the width of the internal canvas coordinate space.
width | the width, in pixels |
---|
Returns a data URL for the current content of the canvas element.
Returns a data URL for the current content of the canvas element, with a specified type.
type | the type of the data url, e.g., image/jpeg or image/png. |
---|