Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / gfx / README @ 9

History | View | Annotate | Download (4.34 KB)

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

    
22
Implementation of simple portable 2D graphics library.
23
-------------------------------------------------------------------------------
24
Dependencies:
25

    
26
Dojo Core
27
-------------------------------------------------------------------------------
28
Documentation
29

    
30
Currently it can be found here: http://docs.google.com/Doc?id=d764479_1hnb2tn
31

    
32
HTMLCanvas Renderer Status
33

    
34
To use canvas rendering, insert 'canvas' at the beginning of the gfxRenderers list in your
35
djConfig, for example:
36
<script type="text/javascript" src="../../../dojo/dojo.js"
37
	djConfig="parseOnLoad: true, gfxRenderer: 'canvas,svg,silverlight,vml'"></script>
38
canvas currently will only render on non-IE browsers (see dojox/gfx.js for where the renderer is loaded);
39
although it should be possible to use an IE canvas implementation (like Google's); however, it will be very slow.
40

    
41
The following tests can be made to work with HTML Canvas with minor testcase modification:
42
dojox/gfx/tests
43
	test_gfx.html-Bugs #1
44
	test_arc.html
45
	test_bezier.html
46
	test_pattern.html
47
	test_gradient.html
48
	test_linearGradient.html
49
	test_image1.html - Limitation #3
50
	test_transform.html - Bug #1
51
	test_poly.html - Bug #1
52
dojox/gfx/demos
53
	butterfly.html - Bug #1
54
	lion.html - Bug #1
55
	tiger.html - Bug #1
56
	circles.html - No event processing yet :(
57
	creator.html
58
dojox/chart
59
	test_pie2d.html - Dojo Charts on iPhone anyone? :)
60
	test_chart2d.html -
61

    
62
	// To make charts work, the following line needs to be added to the end of the
63
	// Chart2D.js render() method (prior to return)
64
	if(this.surface.render){this.surface.render()};
65

    
66
Known Limitations:
67
1) event handling- plan is to capture all events at canvas, perform intersect/hit
68
   tests (not implemented) against scene graph, then propogate event to top-most
69
   intersected shape.  HtmlCanvas shape need intersectsStroke and intersectsBounds,
70
   and intersects (region).
71
2) SVG and VML are "live" scene graphs; eg. any state change to objects in the
72
   scene automatically get rendered in next engine render pass. For canvas, it's
73
   procedural, and current implementation requires application to call surface.render()
74
   whenever scene needs to be updated. Plan is to do dirty region checking based
75
   on bounding boxes (currently not properly computed), and track dirty areas anytime
76
   state changes (invalidate) separate from render phase.
77
   Add the following call where changes to the scene graph are complete and you want to
78
   render:
79

    
80
	if (surface.render){surface.render();}
81

    
82
4) Text/Text Paths - Text shape is implemented using DIV overlays.  Many text styles are not
83
   applied, and outline/fills are not possible.  This is due to limitations in Canvas spec.
84
   Firefox 3.0 has proprietary text functions that we could test for and use once FF3 is out.
85
   No luck on Safari.
86
3) No Image skewing - Limitation of Canvas
87

    
88
Known Bugs:
89
1) Matrix xformations (applied from root to shape leaf nodes) not quite right--but very close.
90
   Canvas does not have a built in transformation function that allows skewing.  Need to
91
   track skew matrix with Shape, and perform other trans/rot/scale transformations without
92
   using canvas transform functions.
93

    
94
SVGWeb Integration Status
95

    
96
See README-svgweb.
97

    
98
-------------------------------------------------------------------------------
99
Installation instructions
100

    
101
Grab the following from the Dojo SVN Repository:
102
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx.js
103
http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/gfx/*
104

    
105
Install into the following directory structure:
106
/dojox/gfx/
107

    
108
...which should be at the same level as your Dojo checkout.
109
-------------------------------------------------------------------------------