99
CanvasPixelArray object, 170
CanvasRenderingContext2D object
about, 17
arc() method, 42, 293
arcTo() method, 44
beginPath() method, 39, 446
bezierCurveTo() method, 44
clearRect() method, 37, 77–79
clip() method, 17, 38, 45
closePath() method, 39, 446
createLinearGradient() method, 62, 66, 67,
107, 129
createPattern() method, 71, 109, 110
createRadialGradient() method, 68, 109
current state and, 17
drawImage() method, 14, 136, 137–142,
162–164, 166, 324, 357, 377, 405, 426
fill() method, 65
fillRect() method, 13, 37
fillStyle property, 13, 17, 23, 38, 60, 62, 82,
94, 332
fillText() method, 13, 82, 82, 85–89, 332
font property, 13, 17, 23, 38, 82, 85, 89–93
getImageData() method, 171, 172, 182, 550,
552
globalAlpha property, 17, 26, 28–29, 38, 47–
50, 101–103, 455
globalCompositeOperation property, 17, 38,
47–50
isPointInPath() method, 79
lineCap property, 17, 38, 39, 42
lineJoin property, 17, 38, 40, 42
lineTo() method, 39, 446
lineWidth property, 17, 38, 40
measureText() method, 84, 100, 112
miterLimit property, 17, 38
moveTo() method, 39, 446
putImageData() method, 171, 550, 552
quadraticCurveTo() method, 44
rect() method, 45
restore() method, 38, 46, 150, 451
rotate() method, 38, 52, 57, 336, 452
save() method, 38, 46, 150, 451
scale() method, 56–58, 57
setTransform() method, 38, 51
shadowBlur property, 17, 38, 75–77, 104
shadowColor property, 17, 38, 75–77, 104
shadowOffsetX property, 17, 38, 75–77, 104
shadowOffsetY property, 17, 38, 75–77, 104
stroke() method, 40, 446
strokeRect() method, 14, 37, 64
strokeStyle property, 17, 38, 39, 40, 60, 94,
446
strokeText() method, 86–89
textAlign property, 17, 38, 98, 100
textBaseline property, 13, 17, 23, 38, 97
translate() method, 53, 336, 453
Cartesian coordinate system, 17
Cascading Style Sheets (CSS)
about, 5
future of text on Canvas, 133
Text API and, 81
Catto, Erin, 281
Cecco, Raffaele, 664
cell-based animation
advanced, 145–149
simple, 142–144
chat applications
about, 634
creating with ElectroServer, 636–641
testing, 641
Christmas tree application
about, 646
application design, 647–659
creating, 646
Windows 8 support, 659–663
circles
collision detection for, 222
update-collide-render cycle, 223
circular movement (see curve and circular
movement)
clearing the Canvas, 77–79
click-and-drag volume slider, 406–416
coarse scrolling method
about, 572
full code example, 580–584
codecs
audio, 305
video, 305–307
COLLADA 3D models, 629
collision detection
about, 182–184
audio player example, 401
checking intersection between two objects,
184–190
Geo Blaster Basic game, 481–483
Geo Blaster Extended game, 535, 539–541
for multiple balls, 219–232
714 | Index