Class: Hornetseye::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/hornetseye-frame/node.rb

Instance Method Summary collapse

Instance Method Details

#orig_to_type_with_frameObject



22
# File 'lib/hornetseye-frame/node.rb', line 22

alias_method :orig_to_type_with_frame, :to_type_with_frame

#to_type_with_frame(target) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/hornetseye-frame/node.rb', line 24

def to_type_with_frame( target )
  if target.is_a? FourCC
    if ( typecode < INT_ and typecode != UBYTE ) or typecode < FLOAT_
      to_type( UBYTE ).to_type target
    elsif typecode < COMPLEX_
      real.to_type target
    elsif typecode < RGB_ and typecode != UBYTERGB
      to_type( UBYTERGB ).to_type target
    else
      memorise.orig_to_type_with_frame target
    end
  else
    to_type_without_frame target
  end
end