Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1
625

fillText() method, 461, 488–489
font property, 461, 488
getImageData() method, 461
globalAlpha property, 461
globalCompositeOperation property, 461
implementing, 462–463
isPointInPath() method, 461
lineCap property, 461
lineJoin property, 461, 471–472, 474–475
lineTo() method, 461, 475–477
lineWidth property, 461, 470–471, 474–475,
479
measureText() method, 461
miterLimit property, 461
moveTo() method, 462, 475, 478
putImageData() method, 462
quadraticCurveTo() method, 462
rect() method, 462, 475, 478–479
restore() method, 462, 474–475
rotate() method, 462
save() method, 462, 474–475
scale() method, 462
setTransform() method, 462
shadowBlur property, 462
shadowColor property, 462
shadowOffsetX property, 462
shadowOffsetY property, 462
stroke() method, 462, 475, 478–481
strokeRect() method, 462–464, 478
strokeStyle property, 462, 472–475
strokeText() method, 462, 488–489
textAlign property, 462, 488–489
textBaseline property, 462, 488–489
transform() method, 462
translate() method, 462
<caption> element, 33, 241
captions, adding to tables, 241
caret (^) symbol, 156
cascading if statements, 81

call methods, 279–280
calling functions, 74
canplay event, 119
canplaythrough event, 119


element
described, 33, 460
drawing with images, 490
getContext() method, 460
height attribute, 460
implementing, 462–463
toDataUrl() method, 460
width attribute, 460
Canvas Pattern object, 468–469
CanvasGradient object, 466–468
CanvasRenderingContext2D object
addColorStop() method, 461, 466–467
arc() method, 461, 481–485
arcTo() method, 461, 485–487
beginPath() method, 461, 475
bezierCurveTo() method, 461
clearRect() method, 461, 463–464
clip() method, 461
closePath() method, 461, 477– 478
configuring drawing state, 465–474
createImageData() method, 461
createLinearGradient() method, 461, 466–467
createPattern() method, 461, 468–469
createRadialGradient() method, 461, 466–467
data property, 461
described, 460
drawImage() method, 461, 490–493
drawing arcs, 481–487
drawing rectangles, 463–475, 478–479
drawing text, 488–490
drawing using paths, 475–487
drawing with images, 490–494
endPath() method, 475
fill() method, 461, 475, 477–481
fillRect() method, 461, 463–464, 478
fillStyle property, 461, 465–470
cascading if statements
Free download pdf