|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.core.client.JavaScriptObject com.google.gwt.dom.client.Node com.google.gwt.dom.client.Element com.google.gwt.dom.client.CanvasElement
@TagName(value="canvas") public class CanvasElement
Canvas element.
Field Summary | |
---|---|
static java.lang.String |
TAG
The tag for this element. |
Fields inherited from class com.google.gwt.dom.client.Element |
---|
DRAGGABLE_AUTO, DRAGGABLE_FALSE, DRAGGABLE_TRUE |
Fields inherited from class com.google.gwt.dom.client.Node |
---|
DOCUMENT_NODE, ELEMENT_NODE, TEXT_NODE |
Constructor Summary | |
---|---|
protected |
CanvasElement()
|
Method Summary | |
---|---|
Context |
getContext(java.lang.String contextId)
Gets the rendering context that may be used to draw on this canvas. |
Context2d |
getContext2d()
Returns a 2D rendering context. |
int |
getHeight()
Gets the height of the canvas. |
int |
getWidth()
Gets the width of the canvas. |
void |
setHeight(int height)
Sets the height of the canvas. |
void |
setWidth(int width)
Sets the width of the canvas. |
java.lang.String |
toDataUrl()
Returns a data URL for the current content of the canvas element. |
java.lang.String |
toDataUrl(java.lang.String type)
Returns a data URL for the current content of the canvas element, with a specified type. |
Methods inherited from class com.google.gwt.dom.client.Node |
---|
appendChild, cloneNode, getChild, getChildCount, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, hasChildNodes, hasParentElement, insertAfter, insertBefore, insertFirst, isOrHasChild, removeAllChildren, removeChild, removeFromParent, replaceChild, setNodeValue |
Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
---|
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TAG
Constructor Detail |
---|
protected CanvasElement()
Method Detail |
---|
public final Context getContext(java.lang.String contextId)
contextId
- the context id as a String
public final Context2d getContext2d()
getContext(String)
.
public final int getHeight()
setHeight(int)
public final int getWidth()
setWidth(int)
public final void setHeight(int height)
height
- the height, in pixelsgetHeight()
public final void setWidth(int width)
width
- the width, in pixelsgetWidth()
public final java.lang.String toDataUrl()
public final java.lang.String toDataUrl(java.lang.String type)
type
- the type of the data url, e.g., image/jpeg or image/png.
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |