Web Vector Graphics

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

6 Favorites & 1 Group

Web Vector Graphics - Presentation Transcript

  1. Web Vector Graphics Web Directions South ’08 Dmitry Baranovskiy
  2. Web Myths:
  3. Web is text only
  4. Web pages are static
  5. Web is synchronous
  6. Web is rectangular
  7. Canvas SVG
  8. Canvas SVG !
  9. Canvas SVG !
  10. Canvas SVG
  11. SVG
  12. <?xml version=\"1.0\" encoding=\"utf-8\"?> <!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/ Graphics/SVG/1.1/DTD/svg11.dtd\"> <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"> <rect fill=\"#333\" width=\"426\" height=\"260.667\"/> <ellipse cx=\"213\" cy=\"130\" rx=\"205\" ry=\"117\"> <animate attributeName=\"fill\" attributeType=\"CSS\" begin=\"0s\" dur=\"6s\" fill=\"freeze\" from=\"#000\" to=\"#f00\"/> <animate attributeName=\"rx\" begin=\"0s\" dur=\"6s\" fill=\"freeze\" from=\"205\" to=\"117\"/> </ellipse> <path fill=\"none\" stroke=\"#fff\" stroke-width=\"5\" stroke-linecap=\"round\" d=\"M24.397,99.601c0,0,12.537,0,16.805,0s10.137, 5.869,10.137,5.869s16.273,43.75,18.94,49.885 ... s-1.601,63.224,12.805,63.224h28.01\"/> </svg>
  13. Canvas
  14. window.onload = function () { var elem = document.createElement(\"canvas\"); elem.width = 500; elem.height = 500; document.body.appendChild( elem ); var context = elem.getContext(\"2d\"); context.fillRect(0, 0, elem.width, elem.height); var pos = 0, dir = 1; setInterval(function () { context.rotate( 15 ); context.fillStyle = \"rgba(0,0,0,0.05)\"; context.fillRect(0, 0, elem.width, elem.height); context.fillStyle = \"rgba(255, 0, 0, 1)\"; context.fillRect(pos, pos, 20, 20); pos += dir; if ( pos > elem.width ) { dir = -1; } else if ( pos + 20 < 0 ) { dir = 1; } }, 10); };
  15. Canvas
  16. Canvas SVG
  17. Support
  18. Does browser support Canvas?
  19. Does browser support Canvas? if (window.CanvasRenderingContext2D) { … }
  20. Does browser support SVG?
  21. Does browser support SVG? if (window.SVGAngle) { … }
  22. 178
  23. 6 SVGAngle SVGLength SVGPathSeg SVGPreserveAspectRatio SVGTransform SVGUnitTypes
  24. Tests: SVG 178 : http://www.w3.org/Graphics/SVG/Test/20061213/ htmlObjectHarness/full index.html Canvas 672 : http://philip.html5.org/tests/canvas/suite/tests/
  25. 203 118 469 160 Canvas SVG 64%
  26. 182 60 490 218 Canvas SVG 76%
  27. 30 184 248 488 Canvas SVG 81%
  28. What does it mean?
  29. ere is support
  30. …with one Important Exception
  31. 0%
  32. VML
  33. VML
  34. VML
  35. VML
  36. So, what can you do with Canvas ! SVG?
  37. Shapes
  38. Images
  39. Text
  40. Canvas SVG VML JavaScript off CSS Result pixels DOM DOM Animation Filters Image Data Text Stand alone Easy to use
  41. SVG Canvas VML
  42. What stops you from using this now?
  43. How to do this across all the browsers?
  44. DojoX http://dojotoolkit.org/projects/dojox/
  45. ExCanvas.js ! mooCanvas.js http://excanvas.sourceforge.net/ http://ibolmo.com/projects/moocanvas/
  46. Raphaël http://raphaeljs.com/
  47. Cappuccino http://cappuccino.org/
  48. Just go and do it!
  49. ank You http://dmitry.baranovskiy.com/ dmitry@baranovskiy.com

+ Dmitry BaranovskiyDmitry Baranovskiy, 9 months ago

custom

3072 views, 6 favs, 2 embeds more stats

My presentation on vector graphics at Web Direction more

More Info

© All Rights Reserved

Go to text version
  • Total Views 3072
    • 2883 on SlideShare
    • 189 from embeds
  • Comments 1
  • Favorites 6
  • Downloads 66
Most viewed embeds
  • 188 views on http://www.webdirections.org
  • 1 views on http://static.slideshare.net

more

All embeds
  • 188 views on http://www.webdirections.org
  • 1 views on http://static.slideshare.net

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories

Groups / Events