Class: PhotoscanOutputs::Resolution

Inherits:
Object
  • Object
show all
Defined in:
lib/photoscan_outputs/camera.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(w, h) ⇒ Resolution

Returns a new instance of Resolution.



45
46
47
48
# File 'lib/photoscan_outputs/camera.rb', line 45

def initialize( w, h )
  @w = w
  @h = h
end

Instance Attribute Details

#hObject (readonly) Also known as: height

Returns the value of attribute h.



41
42
43
# File 'lib/photoscan_outputs/camera.rb', line 41

def h
  @h
end

#wObject (readonly) Also known as: width

Returns the value of attribute w.



41
42
43
# File 'lib/photoscan_outputs/camera.rb', line 41

def w
  @w
end

Class Method Details

.from_xml(xml) ⇒ Object



50
51
52
53
54
# File 'lib/photoscan_outputs/camera.rb', line 50

def self.from_xml( xml )
  w = xml.width
  h = xml.height
  Resolution.new( w, h )
end