com.gwt.components.client
Class Canvas
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.gwt.components.client.Canvas
- All Implemented Interfaces:
- com.google.gwt.user.client.EventListener
public class Canvas
- extends com.google.gwt.user.client.ui.Widget
Field Summary |
private com.google.gwt.core.client.JavaScriptObject |
context
|
Constructor Summary |
Canvas(int width,
int height)
|
Method Summary |
void |
arc(float x,
float y,
float radius,
float startAngle,
float endAngle,
boolean anticlockwise)
|
void |
arcTo(float x1,
float y1,
float x2,
float y2,
float radius)
|
void |
beginPath()
|
void |
bezierCurveTo(float cp1x,
float cp1y,
float cp2x,
float cp2y,
float x,
float y)
|
void |
clearRect(float x,
float y,
float w,
float h)
|
void |
clip()
|
void |
closePath()
|
Canvas.LinearGradient |
createLinearGradient(float x0,
float y0,
float x1,
float y1)
|
Canvas.Pattern |
createPattern(com.google.gwt.user.client.ui.Image img,
java.lang.String repetition)
|
Canvas.RadialGradient |
createRadialGradient(float x0,
float y0,
float r0,
float x1,
float y1,
float r1)
|
void |
fill()
|
void |
fillRect(float x,
float y,
float w,
float h)
|
float |
getGlobalAlpha()
|
java.lang.String |
getGlobalCompositeOperation()
|
java.lang.String |
getLineCap()
|
java.lang.String |
getLineJoin()
|
float |
getLineWidth()
|
float |
getMiterLimit()
|
float |
getShadowBlur()
|
java.lang.String |
getShadowColor()
|
float |
getShadowOffsetX()
|
float |
getShadowOffsetY()
|
protected void |
init()
|
static boolean |
isEmulation()
|
boolean |
isPointInPath(float x,
float y)
|
void |
lineTo(float x,
float y)
|
void |
moveTo(float x,
float y)
|
void |
quadraticCurveTo(float cpx,
float cpy,
float x,
float y)
|
void |
rect(float x,
float y,
float w,
float h)
|
void |
restoreContext()
|
void |
rotate(float angle)
|
void |
saveContext()
|
void |
scale(float x,
float y)
|
void |
setFillStyle(Canvas.DrawingStyle style)
|
void |
setFillStyle(java.lang.String style)
|
void |
setGlobalAlpha(float alpha)
|
void |
setGlobalCompositeOperation(java.lang.String operation)
|
void |
setLineCap(java.lang.String lineCap)
|
void |
setLineJoin(java.lang.String lineJoin)
|
void |
setLineWidth(float lineWidth)
|
void |
setMiterLimit(float miterLimit)
|
void |
setShadowBlur(float blur)
|
void |
setShadowColor(java.lang.String style)
|
void |
setShadowOffsetX(float x)
|
void |
setShadowOffsetY(float y)
|
void |
setStrokeColor(java.lang.String color)
|
void |
setStrokeStyle(Canvas.DrawingStyle style)
|
void |
setTransform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy)
|
void |
stroke()
|
void |
strokeRect(float x,
float y,
float w,
float h)
|
void |
transform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy)
|
void |
translate(float x,
float y)
|
Methods inherited from class com.google.gwt.user.client.ui.Widget |
getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
context
private com.google.gwt.core.client.JavaScriptObject context
Canvas
public Canvas(int width,
int height)
isEmulation
public static boolean isEmulation()
init
protected void init()
saveContext
public void saveContext()
restoreContext
public void restoreContext()
scale
public void scale(float x,
float y)
rotate
public void rotate(float angle)
translate
public void translate(float x,
float y)
transform
public void transform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy)
setTransform
public void setTransform(float m11,
float m12,
float m21,
float m22,
float dx,
float dy)
getGlobalAlpha
public float getGlobalAlpha()
setGlobalAlpha
public void setGlobalAlpha(float alpha)
getGlobalCompositeOperation
public java.lang.String getGlobalCompositeOperation()
setGlobalCompositeOperation
public void setGlobalCompositeOperation(java.lang.String operation)
setStrokeStyle
public void setStrokeStyle(Canvas.DrawingStyle style)
setStrokeColor
public void setStrokeColor(java.lang.String color)
setFillStyle
public void setFillStyle(Canvas.DrawingStyle style)
setFillStyle
public void setFillStyle(java.lang.String style)
createLinearGradient
public Canvas.LinearGradient createLinearGradient(float x0,
float y0,
float x1,
float y1)
createRadialGradient
public Canvas.RadialGradient createRadialGradient(float x0,
float y0,
float r0,
float x1,
float y1,
float r1)
createPattern
public Canvas.Pattern createPattern(com.google.gwt.user.client.ui.Image img,
java.lang.String repetition)
getLineWidth
public float getLineWidth()
setLineWidth
public void setLineWidth(float lineWidth)
getLineCap
public java.lang.String getLineCap()
setLineCap
public void setLineCap(java.lang.String lineCap)
getLineJoin
public java.lang.String getLineJoin()
setLineJoin
public void setLineJoin(java.lang.String lineJoin)
getMiterLimit
public float getMiterLimit()
setMiterLimit
public void setMiterLimit(float miterLimit)
getShadowOffsetX
public float getShadowOffsetX()
setShadowOffsetX
public void setShadowOffsetX(float x)
getShadowOffsetY
public float getShadowOffsetY()
setShadowOffsetY
public void setShadowOffsetY(float y)
getShadowBlur
public float getShadowBlur()
setShadowBlur
public void setShadowBlur(float blur)
getShadowColor
public java.lang.String getShadowColor()
setShadowColor
public void setShadowColor(java.lang.String style)
clearRect
public void clearRect(float x,
float y,
float w,
float h)
fillRect
public void fillRect(float x,
float y,
float w,
float h)
strokeRect
public void strokeRect(float x,
float y,
float w,
float h)
beginPath
public void beginPath()
closePath
public void closePath()
moveTo
public void moveTo(float x,
float y)
lineTo
public void lineTo(float x,
float y)
quadraticCurveTo
public void quadraticCurveTo(float cpx,
float cpy,
float x,
float y)
bezierCurveTo
public void bezierCurveTo(float cp1x,
float cp1y,
float cp2x,
float cp2y,
float x,
float y)
arcTo
public void arcTo(float x1,
float y1,
float x2,
float y2,
float radius)
rect
public void rect(float x,
float y,
float w,
float h)
arc
public void arc(float x,
float y,
float radius,
float startAngle,
float endAngle,
boolean anticlockwise)
fill
public void fill()
stroke
public void stroke()
clip
public void clip()
isPointInPath
public boolean isPointInPath(float x,
float y)