public class CanvasRenderingContext2D extends SimpleScriptable
| Constructor and Description |
|---|
CanvasRenderingContext2D() |
| Modifier and Type | Method and Description |
|---|---|
void |
arc(double x,
double y,
double radius,
double startAngle,
double endAngle,
boolean anticlockwise)
Draws an arc.
|
void |
arcTo(double x1,
double y1,
double x2,
double y2,
double radius)
Draws an arc.
|
void |
beginPath()
Begins the subpaths.
|
void |
bezierCurveTo(double cp1x,
double cp1y,
double cp2x,
double cp2y,
double x,
double y)
Draws a cubic Bézier curve.
|
void |
clearRect(double x,
double y,
double w,
double h)
Clears the specified rectangular area.
|
void |
clip()
Creates a new clipping region.
|
void |
closePath()
Closes the subpaths.
|
void |
createImageData()
Creates a new, blank ImageData object with the specified dimensions.
|
void |
createLinearGradient(double x0,
double y0,
double r0,
double x1,
Object y1,
Object r1)
Creates linear gradient.
|
void |
createPattern()
Creates a pattern.
|
void |
createRadialGradient()
Creates a gradient.
|
static void |
drawImage(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
Draws images onto the canvas.
|
void |
fill()
Fills the shape.
|
void |
fillRect(double x,
double y,
double w,
double h)
Paints the specified rectangular area.
|
void |
fillText()
Dummy placeholder.
|
Object |
getFillStyle()
Returns the "fillStyle" property.
|
double |
getGlobalAlpha()
Returns the "globalAlpha" property.
|
void |
getImageData()
Dummy placeholder.
|
void |
getLineDash()
Dummy placeholder.
|
void |
getLineData()
Dummy placeholder.
|
double |
getLineWidth()
Returns the "lineWidth" property.
|
Object |
getStrokeStyle()
Returns the "strokeStyle" property.
|
void |
isPointInPath()
Dummy placeholder.
|
void |
lineTo(double x,
double y)
Connect the last point to the given point.
|
void |
measureText()
Dummy placeholder.
|
void |
moveTo(double x,
double y)
Creates a new subpath.
|
void |
putImageData()
Dummy placeholder.
|
void |
quadraticCurveTo(double controlPointX,
double controlPointY,
double endPointX,
double endPointY)
Draws a quadratic Bézier curve.
|
void |
rect()
Dummy placeholder.
|
void |
restore()
Pops state stack and restore state.
|
void |
rotate()
Dummy placeholder.
|
void |
save()
Pushes state on state stack.
|
void |
scale(Object x,
Object y)
Changes the transformation matrix to apply a scaling transformation with the given characteristics.
|
void |
setFillStyle(Object fillStyle)
Sets the "fillStyle" property.
|
void |
setGlobalAlpha(Object globalAlpha)
Sets the "globalAlpha" property.
|
void |
setLineDash()
Dummy placeholder.
|
void |
setLineWidth(Object lineWidth)
Sets the "lineWidth" property.
|
void |
setStrokeStyle(Object strokeStyle)
Sets the "strokeStyle" property.
|
void |
setTransform()
Dummy placeholder.
|
void |
stroke()
Calculates the strokes of all the subpaths of the current path.
|
void |
strokeRect(double x,
double y,
double w,
double h)
Strokes the specified rectangular area.
|
void |
strokeText()
Dummy placeholder.
|
void |
transform()
Dummy placeholder.
|
void |
translate(Object x,
Object y)
Changes the transformation matrix to apply a translation transformation with the given characteristics.
|
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, sizepublic Object getFillStyle()
public void setFillStyle(Object fillStyle)
fillStyle - the "fillStyle" propertypublic Object getStrokeStyle()
public void setStrokeStyle(Object strokeStyle)
strokeStyle - the "strokeStyle" propertypublic double getLineWidth()
public void setLineWidth(Object lineWidth)
lineWidth - the "lineWidth" propertypublic double getGlobalAlpha()
public void setGlobalAlpha(Object globalAlpha)
globalAlpha - the "globalAlpha" propertypublic void arc(double x,
double y,
double radius,
double startAngle,
double endAngle,
boolean anticlockwise)
x - the xy - the yradius - the radiusstartAngle - the start angleendAngle - the end angleanticlockwise - is anti-clockwisepublic void arcTo(double x1,
double y1,
double x2,
double y2,
double radius)
x1 - the x1y1 - the y1x2 - the x2y2 - the y2radius - the radiuspublic void beginPath()
public void bezierCurveTo(double cp1x,
double cp1y,
double cp2x,
double cp2y,
double x,
double y)
cp1x - the cp1xcp1y - the cp1ycp2x - the cp2xcp2y - the cp2yx - the xy - the ypublic void clearRect(double x,
double y,
double w,
double h)
x - the xy - the yw - the widthh - the heightpublic void clip()
public void closePath()
public void createImageData()
public void createLinearGradient(double x0,
double y0,
double r0,
double x1,
Object y1,
Object r1)
x0 - the x0y0 - the y0r0 - the r0x1 - the x1y1 - the y1r1 - the r1public void createPattern()
public void createRadialGradient()
public static void drawImage(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
context - the JavaScript contextthisObj - the scriptableargs - the arguments passed into the methodfunction - the functionpublic void fill()
public void fillRect(double x,
double y,
double w,
double h)
x - the xy - the yw - the widthh - the heightpublic void fillText()
public void getImageData()
public void getLineDash()
public void getLineData()
public void isPointInPath()
public void lineTo(double x,
double y)
x - the xy - the ypublic void measureText()
public void moveTo(double x,
double y)
x - the xy - the ypublic void putImageData()
public void quadraticCurveTo(double controlPointX,
double controlPointY,
double endPointX,
double endPointY)
controlPointX - the x-coordinate of the control pointcontrolPointY - the y-coordinate of the control pointendPointX - the x-coordinate of the end pointendPointY - the y-coordinate of the end pointpublic void rect()
public void restore()
public void rotate()
public void save()
public void scale(Object x, Object y)
x - the scale factor in the horizontal directiony - the scale factor in the vertical directionpublic void setLineDash()
public void setTransform()
public void stroke()
public void strokeRect(double x,
double y,
double w,
double h)
x - the xy - the yw - the widthh - the heightpublic void strokeText()
public void transform()
Copyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.