Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
jQuery 1.4 Animation Techniques: Beginners Guide

You're reading from  jQuery 1.4 Animation Techniques: Beginners Guide

Product type Book
Published in Mar 2011
Publisher Packt
ISBN-13 9781849513302
Pages 344 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (19) Chapters

jQuery 1.4 Animation Techniques Beginner's Guide
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introduction 2. Fading Animations 3. Managing Animations 4. Sliding Animations 5. Custom Animations 6. Extended Animations with jQuery UI 7. Full Page Animations 8. Other Popular Animations 9. CSS3 Animations 10. Canvas Animations Pop Quiz Answers Index

The canvas API


The <canvas> element comes with a rich scripting API that exposes methods and properties allowing us to define and control the shapes that are drawn on the canvas. The API can be broken down into distinct sections depending on what the methods do.

The canvas element

The <canvas> element itself has a couple of methods that can be called on it, including:

Method

Usage

getContext(a)

Returns an object (a CanvasRenderingContext2D object to be precise) which can then have other methods from the API called on it to manipulate the <canvas>. The argument specifies the type of context to retrieve. Only two dimensional contexts are available at present.

toDataURL()

Returns a data URL representing the image on the <canvas>. Optional arguments include the type of image represented by the data URL (with the default being image/png), and any arguments specific to the type, such as the quality for image/jpg data URLs.

The <canvas> element can be thought...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}