Book description
The Canvas element is a revolutionary feature of HTML5 that enables powerful graphics for rich Internet applications, and this pocket reference provides the essentials you need to put this element to work. If you have working knowledge of JavaScript, this book will help you create detailed, interactive, and animated graphics -- from charts to animations to video games -- whether you're a web designer or a programmer interested in graphics.
Canvas Pocket Reference provides both a tutorial that covers all of the element's features with plenty of examples and a definitive reference to each of the Canvas-related classes, methods, and properties.
You'll learn how to:
- Draw lines, polygons, and curves
- Apply colors, gradients, patterns, and transparency
- Use transformations to smoothly rotate and resize drawings
- Work with text in a graphic environment
- Apply shadows to create a sense of depth
- Incorporate bitmapped images into vector graphics
- Perform image processing operations in JavaScript
Publisher resources
Table of contents
- Canvas Pocket Reference
- A Note Regarding Supplemental Files
- Preface
-
1. Canvas Tutorial
- Drawing Lines and Filling Polygons
- Graphics Attributes
- Canvas Dimensions and Coordinates
- Coordinate System Transforms
- Drawing and Filling Curves
- Rectangles
- Colors, Transparency, Gradients, and Patterns
- Line-Drawing Attributes
- Text
- Clipping
- Shadows
- Images
- Compositing
- Pixel Manipulation
- Hit Detection
- Canvas Example: Sparklines
-
2. Canvas Reference
- Canvas
- Canvas.getContext()
- Canvas.toDataURL()
- CanvasGradient
- CanvasGradient.addColorStop()
- CanvasPattern
- CanvasPixelArray
- CRC
- CRC.arc()
- CRC.arcTo()
- CRC.beginPath()
- CRC.bezierCurveTo()
- CRC.clearRect()
- CRC.clip()
- CRC.closePath()
- CRC.createImageData()
- CRC.createLinearGradient()
- CRC.createPattern()
- CRC.createRadialGradient()
- CRC.drawImage()
- CRC.fill()
- CRC.fillRect()
- CRC.fillText()
- CRC.getImageData()
- CRC.globalCompositeOperation
- CRC.isPointInPath()
- CRC.lineCap
- CRC.lineJoin
- CRC.lineTo()
- CRC.measureText()
- CRC.miterLimit
- CRC.moveTo()
- CRC.putImageData()
- CRC.quadraticCurveTo()
- CRC.rect()
- CRC.restore()
- CRC.rotate()
- CRC.save()
- CRC.scale()
- CRC.setTransform()
- CRC.stroke()
- CRC.strokeRect()
- CRC.strokeText()
- CRC.transform()
- CRC.translate()
- ImageData
- TextMetrics
- Index
- About the Author
- Copyright
Product information
- Title: Canvas Pocket Reference
- Author(s):
- Release date: December 2010
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449302788
You might also like
book
HTML5 Multimedia: Develop and Design
One of the most exciting and talked about aspects of the HTML5 specification is the introduction …
book
The Book of CSS3, 2nd Edition
The Book of CSS3, 2nd Edition distills the murky language of the CSS3 specification into plain …
book
CSS Pocket Reference, 5th Edition
When youâ??re working with CSS and need an answer now, this concise yet comprehensive quick reference …
book
Pro CSS3 Animation
Pro CSS3 Animation will teach you how to use fresh new CSS3 syntax to fully utilize …