module CqlsBeamer
Public Class Methods
defCpt()
click to toggle source
# File lib/dyndoc/plugins/tex/beamer.rb, line 9 def CqlsBeamer.defCpt @@defCpt end
defCpt=(val)
click to toggle source
# File lib/dyndoc/plugins/tex/beamer.rb, line 13 def CqlsBeamer.defCpt=(val) @@defCpt=val end
when(quand,scene=CqlsBeamer::Scene.current)
click to toggle source
# 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 #puts "quand";p quand 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)
click to toggle source
# File lib/dyndoc/plugins/tex/beamer.rb, line 28 def CqlsBeamer.where(where,scene=nil) #Dyndoc.warn "xy",where 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+"]") #puts "xy";p ou ou ="0.0,0.0" if !ou #and ou.empty? if actorFrom.isR # R4rb.eval("ou<-xyPercent(c("+ou+"),'#{fromKey}')") # ou=[] < :ou # Replacement of previous 2 lines failing now! 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 #puts "last in xy";p ou ou end