blob: 945fec460856074b834a721c6da080bff7be9348 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
var KoDraw = {
Canvas: null,
ViewPort: null,
ControlPoints: [],
ControlRules: [],
Init: function(canvas, viewport) {
KoDraw.Canvas = canvas;
KoDraw.ViewPort = viewport;
KoDraw.CanvasInit();
},
CanvasInit: function() {
// Onclick handler that makes KoControlPoints...
KoDraw.Canvas.click(function(event) {
KoDraw.AddControlPoint(event.clientX, event.clientY);
});
},
AddControlPoint: function(x, y) {
KoDraw.ControlPoints.push(new KoControlPoint(x,y))
},
ShowControlPointRules: function(controlpoint) {
},
AddRule: function() {
KoDraw.ControlRules.push(new KoControlRule());
},
EvaluateRules: function() {
for (a in this.ControlRules) {
this.ControlRules[a].Evaluate();
}
}
}
function KoPrimitive() {
}
KoPrimitive.prototype = {
}
|