]> git.pond.sub.org Git - eow/blob - static/dojo-release-1.1.1/dojox/gfx/silverlight_attach.js
add Dojo 1.1.1
[eow] / static / dojo-release-1.1.1 / dojox / gfx / silverlight_attach.js
1 dojo.require("dojox.gfx.silverlight");
2
3 dojo.experimental("dojox.gfx.silverlight_attach");
4
5 (function(){
6         dojox.gfx.attachNode = function(node){
7                 // summary: creates a shape from a Node
8                 // node: Node: an Silverlight node
9                 return null;    // for now
10                 if(!node) return null;
11                 var s = null;
12                 switch(node.tagName.toLowerCase()){
13                         case dojox.gfx.Rect.nodeType:
14                                 s = new dojox.gfx.Rect(node);
15                                 break;
16                         case dojox.gfx.Ellipse.nodeType:
17                                 if(node.width == node.height){
18                                         s = new dojox.gfx.Circle(node);
19                                 }else{
20                                         s = new dojox.gfx.Ellipse(node);
21                                 }
22                                 break;
23                         case dojox.gfx.Polyline.nodeType:
24                                 s = new dojox.gfx.Polyline(node);
25                                 break;
26                         case dojox.gfx.Path.nodeType:
27                                 s = new dojox.gfx.Path(node);
28                                 break;
29                         case dojox.gfx.Line.nodeType:
30                                 s = new dojox.gfx.Line(node);
31                                 break;
32                         case dojox.gfx.Image.nodeType:
33                                 s = new dojox.gfx.Image(node);
34                                 break;
35                         case dojox.gfx.Text.nodeType:
36                                 s = new dojox.gfx.Text(node);
37                                 attachFont(s);
38                                 break;
39                         default:
40                                 //console.debug("FATAL ERROR! tagName = " + node.tagName);
41                                 return null;
42                 }
43                 attachShape(s);
44                 if(!(s instanceof dojox.gfx.Image)){
45                         attachFill(s);
46                         attachStroke(s);
47                 }
48                 attachTransform(s);
49                 return s;       // dojox.gfx.Shape
50         };
51
52         dojox.gfx.attachSurface = function(node){
53                 // summary: creates a surface from a Node
54                 // node: Node: an Silverlight node
55                 return null;    // dojox.gfx.Surface
56         };
57
58         var attachFill = function(rawNode){
59                 // summary: deduces a fill style from a Node.
60                 // rawNode: Node: an Silverlight node
61                 return null;    // Object
62         };
63         
64         var attachStroke = function(rawNode){
65                 // summary: deduces a stroke style from a Node.
66                 // rawNode: Node: an SVG node
67                 return null;    // Object
68         };
69
70         var attachTransform = function(rawNode){
71                 // summary: deduces a transformation matrix from a Node.
72                 // rawNode: Node: an Silverlight node
73                 return null;    // dojox.gfx.matrix.Matrix
74         };
75         
76         var attachFont = function(rawNode){
77                 // summary: deduces a font style from a Node.
78                 // rawNode: Node: an Silverlight node
79                 return null;    // Object
80         };
81         
82         var attachShape = function(rawNode){
83                 // summary: builds a shape from a Node.
84                 // rawNode: Node: an Silverlight node
85                 return null;    // dojox.gfx.Shape
86         };
87 })();