Class: Matterhorn::Smil::Scene

Inherits:
Element
  • Object
show all
Defined in:
lib/matterhorn/smil.rb

Overview

Matterhorn::Smil::Scene ===

Instance Attribute Summary collapse

Attributes inherited from Element

#duration, #end_point, #parent, #rel_begin, #start_point

Instance Method Summary collapse

Methods inherited from Element

#attr_list

Constructor Details

#initialize(parent, file, clip_begin, clip_end) ⇒ Scene

————————————————————————— initialization —



387
388
389
390
391
392
# File 'lib/matterhorn/smil.rb', line 387

def initialize(parent, file, clip_begin, clip_end)
  super(parent)
  @src = file
  @clip_begin = clip_begin
  @clip_end   = clip_end
end

Instance Attribute Details

#clip_beginObject (readonly)

Returns the value of attribute clip_begin.



383
384
385
# File 'lib/matterhorn/smil.rb', line 383

def clip_begin
  @clip_begin
end

#clip_endObject (readonly)

Returns the value of attribute clip_end.



383
384
385
# File 'lib/matterhorn/smil.rb', line 383

def clip_end
  @clip_end
end

Instance Method Details

#propagate(parent_elem) ⇒ Object

——————————————————————————— methodes —



397
398
# File 'lib/matterhorn/smil.rb', line 397

def propagate(parent_elem)
end

#to_xml(bx) ⇒ Object



401
402
403
404
405
406
407
# File 'lib/matterhorn/smil.rb', line 401

def to_xml(bx)
  attributes = Hash.new
  attributes[:src] = @src.to_s
  attributes[:clipBegin] = "#{(@clip_begin * 1000).round.to_s}ms"
  attributes[:clipEnd]   = "#{(@clip_end   * 1000).round.to_s}ms"
  bx.video(attributes)
end