Canvas Pocket Reference
Scripted Graphics for HTML5
Publisher: O'Reilly Media
Released: December 2010
Pages: 110

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
Table of Contents
Product Details
About the Author
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
O'Reilly MediaCanvas Pocket Reference
 
4.0

(based on 6 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (4)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

83%

of respondents would recommend this to a friend.

Pros

  • Concise (6)
  • Helpful examples (6)
  • Easy to understand (5)
  • Accurate (4)
  • Well-written (3)

Cons

    Best Uses

    • Intermediate (6)
    • Expert (5)
    • Novice (3)
    • Student (3)
      • Reviewer Profile:
      • Developer (6), Designer (3)

    Reviewed by 6 customers

    Sort by

    Displaying reviews 1-6

    Back to top

    (1 of 1 customers found this review helpful)

     
    3.0

    canvas: the what and why, and the how

    By aleman-meza

    from Houston, TX

    About Me Developer, Educator

    Verified Reviewer

    Pros

    • Concise
    • Helpful examples

    Cons

      Best Uses

      • Expert
      • Intermediate

      Comments about O'Reilly Media Canvas Pocket Reference:

      The book provides examples to explain feature after feature of canvas, carefully mentioning the concepts behind the feature being explained (strokes, gradients, transparency, text, shadows, etc). This book will explain how things are done and after that, you'll be able to grab sample code from the web and actually be able to customize it to what you need.

      The book contains two chapters that are completely different of each other. The first chapter explains how things work in canvas. For example, whatever you draw uses a style that is defined separately from the drawing code, similar to the separation of content and presentation in HTML/CSS. The way you draw graphics, fill them, color them, etc is different than traditional environments such as Java graphics. At the end of the first chapter, you'll know what can be done using canvas and how.

      The second chapter is a reference of the canvas methods, which will be the details needed once you're actually coding. Fortunately, there are not that many methods in canvas. If unfamiliar with pocket reference books from O'Reilly, they are small, you can carry it in the back pocket of your jeans. If you do not wear jeans or shorts at work, then you may not be the intended audience for this book. I needed a book that explains how to use bitmap images and do image processing in them. The few pages in the book on those topics made the book worthwhile. I'm looking forward to see the Web when most sites use canvas (instead of Flash and the like) for simple graphic animations or just improved user interfaces.

      Disclaimer: I was provided a hard-copy of the book from O'Reilly for review and returned it back after posting the review.

       
      4.0

      Good reference

      By Thiago Galbiatti Vespa

      from São José do Rio Preto, São Paulo, Brazil

      About Me Developer

      Verified Reviewer

      Pros

      • Concise
      • Easy to understand
      • Helpful examples

      Cons

      • Too concise

      Best Uses

      • Expert
      • Intermediate
      • Novice
      • Student

      Comments about O'Reilly Media Canvas Pocket Reference:

      This book covers the use of the HTML element canvas. The author explains how to draw lines, polygons, curves, apply colors, gradients, transparency, transformations, work with text, shadows and perform image processing operations using JavaScript.

      The reader needs a working knowledge of HTML and JavaScript. The first chapter is a tutorial on various aspects of canvas and the second chapter is a reference resource that gives the book its name. One cool thing I found is that despite being a "Pocket Reference", there are code examples too.

      The examples are simple and help those just starting to play with canvas. I recommend this book for those who will or already working with canvas. A reference guide is essential for anyone working with this technology.

      My review in pt_BR: http://www.thiagovespa.com.br/blog/2011/09/09/canvas-pocket-reference-de-david-flanagan-oreilly-media/

      (1 of 1 customers found this review helpful)

       
      4.0

      Good introduction to HTML canvas

      By Rob

      from Brisbane, Australia

      About Me Developer

      Verified Reviewer

      Pros

      • Accurate
      • Concise
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Expert
        • Intermediate
        • Novice

        Comments about O'Reilly Media Canvas Pocket Reference:

        The canvas pocket Terence is a short read, aimed at introducing the canvas DOM element, and the way that it can be used. Additionally it provides a reference to the APIs, useful for people actually using canvas in anger.

        HTML canvas is a powerful tool, bringing a rich drawing API to browsers. There is a strong argument for why this is a limited tool, with it's lack of scalability, but it is nonetheless useful. It is possible to perform many of the simple transformations and drawing tools required for graphing charting and simple image manipulation.

        The tutorial provides enough information to get started, whetting the appetite, and the details provide a decent reference. These combined with Dive into HTML5, the Mozilla Developer Centre and a little bit of googling, are all that you will need to get into the world of canvas.

        [this book was reviewed as a part of the O'Reilly Blogger Review Program]

         
        4.0

        An OK starting point but good reference

        By Tom O

        from Baltimore, MD

        About Me Designer, Developer

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples

        Cons

        • Difficult to understand

        Best Uses

        • Expert
        • Intermediate

        Comments about O'Reilly Media Canvas Pocket Reference:

        When I got the Canvas Pocket Reference I was pretty excited. I've heard a lot about HTML5's canvas tag and was looking forward to getting my hands dirty messing with it. While going through this book, I found the author's insight to be valuable, but the samples and method descriptions a little hard to follow. I liked that the author didn't include boring examples, but I'm uneasy when a tutorial covers conceptually advanced topics (like recursion) early on that the some users may find hard to follow. I thought other examples (like Sparklines) were excellent.This book is broken down into a tutorial chapter and reference chapter. The tutorial topics cover general topics, although it doesn't always cover implementation. The reference chapter however covers how to implement methods and properties of a canvas, but sometimes requires reading better represented in the tutorial. My general impression was that some of the tutorial comments (line-drawing attributes come to mind - I'm one that would confuse miter, bevel and round if I didn't use them frequently) would've been better off in the reference section. Even though I had a little trouble navigating through the book and getting detailed information out of it quickly, it's a good size for a reference book. I still find that it had all the answers I needed, and addressed everything I would need to know. I did hope for some discussion of WebGL, but I know there's still a lot of active development going on.[...]

         
        4.0

        Web programmer? You should get this book

        By Wayne

        from Maumelle

        About Me Designer, Developer, Educator, Hacker

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Novice
          • Student

          Comments about O'Reilly Media Canvas Pocket Reference:

          Canvas Pocket Reference, By David Flanagan, is a short and sweet little book that covers the HTML5 canvas element, made famous by the likes of Mr. Doob's Harmony Sketch tool.In this book, David Flanagan assumes you are familiar with HTML, CSS, and JavaScript, and focuses solely on the canvas element and all the things you can do with it. The first chapter is an introduction to all the ways you can draw on a canvas, with code examples accompanying each description. If you need a refresher or haven't really been exposed to the canvas element, this chapter will serve you well. I only learned about the canvas element this previous summer and never really experimented with it. But this chapter was all I needed to feel comfortable using all of the different canvas drawing methods.The second chapter is just a reference for the canvas element and all of its associated methods. In alphabetical order, it's quite handy if you just need to remember what the parameters for bezierCurveTo() are, or what the name of that function is that closes a path.At [$] for the ebook+Dead tree version, this is a must-buy for any web developers library. Sure, you can find most of the information on the web, but this is a handy guide that you can keep on your desk or in your laptop bag (or just on your computer). I enjoyed reading this book, and I look forward to using it to help me develop my own canvas apps.

           
          5.0

          Great Quick Reference for Designers

          By scott the developer

          from Midland Virginia

          About Me Designer, Developer

          Verified Reviewer

          Pros

          • Accurate
          • Concise
          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

            Best Uses

            • Expert
            • Intermediate
            • Student

            Comments about O'Reilly Media Canvas Pocket Reference:

            I picked up the 'Canvas - Pocket Reference' book by David Flanagan the other day, and went through it to see if I could get a better grasp on the new 'canvas' element featured in HTML5. Within a couple of hours of coding on my computer, I had a great grasp of the basics. It doesn't take a great deal of JavaScript knowledge to get a great deal out of this book. David lays out several very useful examples, and he provides a basic tutorial to what seems to be a ton of attributes and features of the element. It was a quick read, very interesting and to the point. I now feel that I have a great grasp on the new 'canvas' element, and I have already used it in a couple of projects. This book is a great book for designers who are looking for that edge on new technology.

            Displaying reviews 1-6

            Back to top

             
            Buy 2 Get 1 Free Free Shipping Guarantee
            Buying Options
            Immediate Access - Go Digital what's this?
            Ebook: $10.99
            Formats:  APK, DAISY, ePub, Mobi, PDF
            Print & Ebook: $14.29
            Print: $12.99

            Available in Multiple Languages