際際滷

際際滷Share a Scribd company logo
Canvas Deep Dive
     Dave Balmer
      @Balmer
Canvas is one of the
shiny new toys in HTML5.
Actually, the canvas tag is
 almost seven years old.
2004
2004
 Canvas? Its some
drawing thing, right?
Yes, its a drawing thing,
 but a really good one.
Draw complex shapes

 Stroke and fill with colors,
 gradients and images

Path-based masking

 Layering
Text along a path

 Image filters

 Full frame animation

 Rotate, scale and skew
 anything
2011
2011
 Canvas? Its some
drawing thing, right?
Whats the holdup?
Well, it did start as a
 Safari-only party.
And programmers get it,
 but dont have many
   clever uses for it.
Its not designer-friendly.
Lets change that.
Bridge the geek-gap.
Explain what it does in
       English.
Its like bits of
Illustrator & PhotoShop
   built into your browser.
Canvas can solve problems
  that no other tag can.
Graph data on the fly.
       (Live Demo)
Generate images to save
    download time.
        (Live Demo)
Make user experiences
that break outside the box.
          (Live Demo)
A few important things
    to remember.
Canvas lives in the DOM
but it doesnt have a DOM.
Its a draw it and forget it
          model.
You can do image
processing, but its slow.
Canvas is like an image tag.
  You can layer them and
     apply slick CSS.
Drawing is all path based,
which seems odd at first.
Its easy to transform
  images and paths.
Canvas has its limitations.
Canvas is available
today, and on any
 modern browser.
Desktop
 Chrome, Safari, FireFox,
      Opera, IE*
*IE9 has support, earlier versions need some help
            from modernizr.com
Mobile
 iOS, Android, webOS,
BlackBerry, Opera, Bada
Canvas is the
best supported HTML5
  feature out there.*
Q&A
@Balmer

More Related Content

Canvas Deep Dive

Editor's Notes