Raphael

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.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

2 Favorites

Raphael - Presentation Transcript

  1. Raphaël JavaScript Library for Vector Graphics Dmitry Baranovskiy WSG meeting 11 March 2009
  2. Cool
  3. Cool Cool Cool WTF
  4. Raphaël
  5. What is it for?
  6. Demo
  7. What is it?
  8. JavaScript
  9. window.onload = function () { var hldr = document.getElementById(\"holder\"); var text = hldr.getElementsByTagName(\"p\")[0].innerHTML; hldr.innerHTML = \"\"; var R = Raphael(\"holder\", 640, 480), txt = R.set(), attr = {\"font\": '50px \"Georgia\"', opacity: 0.5}; txt.push(R.text(320, 240, text).attr(\"fill\", \"#0f0\")); txt.push(R.text(320, 240, text).attr(\"fill\", \"#f00\")); txt.push(R.text(320, 240, text).attr(\"fill\", \"#00f\")); txt.attr(attr); var mouse = null, rot = 0; document.onmousemove = function (e) { if (mouse === null) { mouse = e.pageX; return; } rot += e.pageX - mouse; txt[0].rotate(e.pageX - mouse); txt[1].rotate((e.pageX - mouse) /1.5); txt[2].rotate((e.pageX - mouse) /2); mouse = e.pageX; }; };
  10. window.onload = function () { var hldr = document.getElementById(\"holder\"); var text = hldr.getElementsByTagName(\"p\")[0].innerHTML; hldr.innerHTML = \"\"; var R = Raphael(\"holder\", 640, 480) 480), txt = R.set(), attr = {\"font\": '50px \"Georgia\"', opacity: 0.5}; txt.push(R.text(320, 240, text).attr(\"fill\", \"#0f0\")); txt.push(R.text(320, 240, text).attr(\"fill\", \"#f00\")); txt.push(R.text(320, 240, text).attr(\"fill\", \"#00f\")); txt.attr(attr); var mouse = null, rot = 0; document.onmousemove = function (e) { if (mouse === null) { mouse = e.pageX; return; } rot += e.pageX - mouse; txt[0].rotate(e.pageX - mouse); txt[1].rotate((e.pageX - mouse) /1.5); txt[2].rotate((e.pageX - mouse) /2); mouse = e.pageX; }; };
  11. How does it work?
  12. Canvas SVG VML
  13. Canvas SVG VML pixels DOM DOM
  14. SVG VML
  15. DOM?
  16. SVG VML
  17. API
  18. circle ellipse image path rect text
  19. animate attr getBBox hide circle insertAfter ellipse insertBefore image remove path rotate scale rect text show stop toBack toFront translate
  20. animate attr getBBox hide circle insertAfter ellipse insertBefore image remove path rotate scale rect text show stop toBack toFront translate
  21. fill animate fill-opacity attr font getBBox font-family hide font-size gradient circle insertAfter opacity ellipse insertBefore rotation image remove scale path rotate stroke scale rect stroke-dasharray text show stroke-linecap stroke-linejoin stop stroke-miterlimit toBack stroke-opacity toFront stroke-width translate translation
  22. fill animate fill-opacity attr font cx getBBox font-family cy hide font-size height gradient circle insertAfter path opacity ellipse insertBefore r rotation image remove rx scale path rotate stroke ry scale rect stroke-dasharray src text show stroke-linecap width stroke-linejoin stop x stroke-miterlimit toBack y stroke-opacity toFront stroke-width translate translation
  23. Element.node
  24. Circle.node.onclick = function () {…};
  25. $(Circle.node).click(…);
  26. 16 Kb
  27. 0.6.4
  28. 0.7
  29. gRaphaël
  30. Yet Another Demo
  31. Raphaël could make you stand out of the crowd.
  32. Using Raphaël could amaze your colleagues
  33. http://RaphaelJS.com/
  34. Thank You

+ Dmitry BaranovskiyDmitry Baranovskiy, 8 months ago

custom

1743 views, 2 favs, 0 embeds more stats

Web Standards Group talk about Raphaël — JavaScr more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 1743
    • 1743 on SlideShare
    • 0 from embeds
  • Comments 2
  • Favorites 2
  • Downloads 41
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

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

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories