Module: CqlsBeamer
- Defined in:
- lib/dyndoc/plugins/tex/beamer.rb
Defined Under Namespace
Classes: Actor, Group, Scene
Class Method Summary
collapse
Class Method Details
.defCpt ⇒ Object
9
10
11
|
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 9
def CqlsBeamer.defCpt
@@defCpt
end
|
.defCpt=(val) ⇒ Object
13
14
15
|
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 13
def CqlsBeamer.defCpt=(val)
@@defCpt=val
end
|
.when(quand, scene = CqlsBeamer::Scene.current) ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 17
def CqlsBeamer.when(quand,scene=CqlsBeamer::Scene.current)
from,from2=quand.split(":")
from=nil unless from2
if from
from,quand=( (from.empty? and scene) ? scene.cpt[0] : CqlsBeamer::Actor[from].when),from2
quand=quand.gsub!(/[0-9]+/){|e| e.to_i+from-1}
end
quand
end
|
.where(where, scene = nil) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 28
def CqlsBeamer.where(where,scene=nil)
from,ou=where.split(":")
ou,from=from,ou unless ou
if from
from,scene=from.split("$") unless scene
from,scene=scene,from unless scene
end
ou.gsub!(/\([^\(]*\)/){|elt| eval(elt) }
if from
fromKey=from.strip
actorFrom=CqlsBeamer::Actor[fromKey]
from=eval("["+actorFrom.where+"]")
ou ="0.0,0.0" if !ou if actorFrom.isR
ou = "xyPercent(c("+ou+"),'#{fromKey}')"
ou = ou.to_R
zoom=actorFrom.isR.dup
dim=CqlsBeamer::Scene[scene].dim
ou[0] /= dim[2].to_f
ou[1] /= dim[3].to_f
else
ou=eval("["+ou+"]")
end
ou="#{from[0]+ou[0]*zoom[0]},#{from[1]+ou[1]*zoom[1]}"
end
ou
end
|