README 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. -------------------------------------------------------------------------------
  2. dojox.gfx
  3. -------------------------------------------------------------------------------
  4. Version 1.100
  5. Release date: 08/01/2006
  6. -------------------------------------------------------------------------------
  7. Project state:
  8. SVG renderer: production
  9. VML renderer: production
  10. Silverlight renderer: beta
  11. HTMLCanvas renderer: beta
  12. SVGWeb integration: experimental
  13. -------------------------------------------------------------------------------
  14. Credits
  15. Eugene Lazutkin (eugene.lazutkin@gmail.com)
  16. Kun Xi (bookstack@gmail.com)
  17. Chris Mitchell (ccmitchellusa@gmail.com) HTML Canvas
  18. Yang Li () SVGWeb integration
  19. -------------------------------------------------------------------------------
  20. Project description
  21. Implementation of simple portable 2D graphics library.
  22. -------------------------------------------------------------------------------
  23. Dependencies:
  24. Dojo Core
  25. -------------------------------------------------------------------------------
  26. Documentation
  27. Currently it can be found here: http://docs.google.com/Doc?id=d764479_1hnb2tn
  28. HTMLCanvas Renderer Status
  29. To use canvas rendering, insert 'canvas' at the beginning of the gfxRenderers list in your
  30. djConfig, for example:
  31. <script type="text/javascript" src="../../../dojo/dojo.js"
  32. djConfig="parseOnLoad: true, gfxRenderer: 'canvas,svg,silverlight,vml'"></script>
  33. canvas currently will only render on non-IE browsers (see dojox/gfx.js for where the renderer is loaded);
  34. although it should be possible to use an IE canvas implementation (like Google's); however, it will be very slow.
  35. The following tests can be made to work with HTML Canvas with minor testcase modification:
  36. dojox/gfx/tests
  37. test_gfx.html-Bugs #1
  38. test_arc.html
  39. test_bezier.html
  40. test_pattern.html
  41. test_gradient.html
  42. test_linearGradient.html
  43. test_image1.html - Limitation #3
  44. test_transform.html - Bug #1
  45. test_poly.html - Bug #1
  46. dojox/gfx/demos
  47. butterfly.html - Bug #1
  48. lion.html - Bug #1
  49. tiger.html - Bug #1
  50. circles.html - No event processing yet :(
  51. creator.html
  52. dojox/chart
  53. test_pie2d.html - Dojo Charts on iPhone anyone? :)
  54. test_chart2d.html -
  55. // To make charts work, the following line needs to be added to the end of the
  56. // Chart2D.js render() method (prior to return)
  57. if(this.surface.render){this.surface.render()};
  58. Known Limitations:
  59. 1) event handling- plan is to capture all events at canvas, perform intersect/hit
  60. tests (not implemented) against scene graph, then propogate event to top-most
  61. intersected shape. HtmlCanvas shape need intersectsStroke and intersectsBounds,
  62. and intersects (region).
  63. 2) SVG and VML are "live" scene graphs; eg. any state change to objects in the
  64. scene automatically get rendered in next engine render pass. For canvas, it's
  65. procedural, and current implementation requires application to call surface.render()
  66. whenever scene needs to be updated. Plan is to do dirty region checking based
  67. on bounding boxes (currently not properly computed), and track dirty areas anytime
  68. state changes (invalidate) separate from render phase.
  69. Add the following call where changes to the scene graph are complete and you want to
  70. render:
  71. if (surface.render){surface.render();}
  72. 4) Text/Text Paths - Text shape is implemented using DIV overlays. Many text styles are not
  73. applied, and outline/fills are not possible. This is due to limitations in Canvas spec.
  74. Firefox 3.0 has proprietary text functions that we could test for and use once FF3 is out.
  75. No luck on Safari.
  76. 3) No Image skewing - Limitation of Canvas
  77. Known Bugs:
  78. 1) Matrix xformations (applied from root to shape leaf nodes) not quite right--but very close.
  79. Canvas does not have a built in transformation function that allows skewing. Need to
  80. track skew matrix with Shape, and perform other trans/rot/scale transformations without
  81. using canvas transform functions.
  82. SVGWeb Integration Status
  83. See README-svgweb.
  84. -------------------------------------------------------------------------------
  85. Installation instructions
  86. Grab the following from the Dojo SVN Repository:
  87. http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx.js
  88. http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx/*
  89. Install into the following directory structure:
  90. /dojox/gfx/
  91. ...which should be at the same level as your Dojo checkout.
  92. -------------------------------------------------------------------------------