CanvasRenderingContext2D

Module:
html
Declared In:

Overview

Use the links in the table of contents to the left to access the documentation.



Functions

arc
arcTo
beginPath
bezierCurveTo
clearRect
clearShadow
clip
closePath
createImageData
createLinearGradient
createPattern
createRadialGradient
drawImage
drawImageFromRect
fill
fillRect
fillText
getImageData
isPointInPath
lineTo
measureText
moveTo
putImageData
quadraticCurveTo
rect
restore
rotate
save
scale
setAlpha
setCompositeOperation
setFillColor
setLineCap
setLineJoin
setLineWidth
setMiterLimit
setShadow
setStrokeColor
setTransform
stroke
strokeRect
strokeText
transform
translate

arc


void arc(
    in float x,
    in float y,
    in float radius,
    in float startAngle,
    in float endAngle,
    in boolean anticlockwise) raises (DOMException); 


arcTo


void arcTo(
    in float x1,
    in float y1,
    in float x2,
    in float y2,
    in float radius) raises (DOMException); 


beginPath


void beginPath(); 


bezierCurveTo


void bezierCurveTo(
    in float cp1x,
    in float cp1y,
    in float cp2x,
    in float cp2y,
    in float x,
    in float y); 


clearRect


void clearRect(
    in float x,
    in float y,
    in float width,
    in float height); 


clearShadow


void clearShadow(); 


clip


void clip(); 


closePath


void closePath(); 


createImageData


ImageData createImageData(
    in float sw,
    in float sh); 


createLinearGradient


CanvasGradient createLinearGradient(
    in float x0,
    in float y0,
    in float x1,
    in float y1) raises (DOMException); 


createPattern


void createPattern(/* 2 */); 


createRadialGradient


CanvasGradient createRadialGradient(
    in float x0,
    in float y0,
    in float r0,
    in float x1,
    in float y1,
    in float r1) raises (DOMException); 


drawImage


void drawImage(/* 3 */); 


drawImageFromRect


void drawImageFromRect(/* 10 */); 


fill


void fill(); 


fillRect


void fillRect(
    in float x,
    in float y,
    in float width,
    in float height); 


fillText


void fillText(/* 4 */); 


getImageData


ImageData getImageData(
    in float sx,
    in float sy,
    in float sw,
    in float sh) raises(DOMException); 


isPointInPath


boolean isPointInPath(
    in float x,
    in float y); 


lineTo


void lineTo(
    in float x,
    in float y); 


measureText


TextMetrics measureText(
    in DOMString text); 


moveTo


void moveTo(
    in float x,
    in float y); 


putImageData


void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */); 


quadraticCurveTo


void quadraticCurveTo(
    in float cpx,
    in float cpy,
    in float x,
    in float y); 


rect


void rect(
    in float x,
    in float y,
    in float width,
    in float height); 


restore


void restore(); 


rotate


void rotate(
    in float angle); 


save


void save(); 


scale


void scale(
    in float sx,
    in float sy); 


setAlpha


void setAlpha(
    in float alpha); 


setCompositeOperation


void setCompositeOperation(
    in DOMString compositeOperation); 


setFillColor


void setFillColor(/* 1 */); 


setLineCap


void setLineCap(
    in DOMString cap); 


setLineJoin


void setLineJoin(
    in DOMString join); 


setLineWidth


void setLineWidth(
    in float width); 


setMiterLimit


void setMiterLimit(
    in float limit); 


setShadow


void setShadow(/* 3 */); 


setStrokeColor


void setStrokeColor(/* 1  */); 


setTransform


void setTransform(
    in float m11,
    in float m12,
    in float m21,
    in float m22,
    in float dx,
    in float dy); 


stroke


void stroke(); 


strokeRect


void strokeRect(/* 4 */); 


strokeText


void strokeText(/* 4 */); 


transform


void transform(
    in float m11,
    in float m12,
    in float m21,
    in float m22,
    in float dx,
    in float dy); 


translate


void translate(
    in float tx,
    in float ty); 

Member Data

canvas
fillStyle
font
globalAlpha
globalCompositeOperation
lineCap
lineJoin
lineWidth
miterLimit
shadowBlur
shadowColor
shadowOffsetX
shadowOffsetY
strokeStyle
textAlign
textBaseline

canvas


readonly attribute HTMLCanvasElement canvas; 


fillStyle


attribute custom fillStyle; 


font


attribute DOMString font; 


globalAlpha


attribute float globalAlpha; 


globalCompositeOperation


attribute DOMString globalCompositeOperation; 


lineCap


attribute DOMString lineCap; 


lineJoin


attribute DOMString lineJoin; 


lineWidth


attribute float lineWidth; 


miterLimit


attribute float miterLimit; 


shadowBlur


attribute float shadowBlur; 


shadowColor


attribute DOMString shadowColor; 


shadowOffsetX


attribute float shadowOffsetX; 


shadowOffsetY


attribute float shadowOffsetY; 


strokeStyle


attribute custom strokeStyle; 


textAlign


attribute DOMString textAlign; 


textBaseline


attribute DOMString textBaseline; 

Did this document help you? Yes It's good, but... Not helpful...

 

Last Updated: 2009-05-29