Method: Bio::Graphics::ImageMap#flip_orientation

Defined in:
lib/bio/graphics/image_map.rb

#flip_orientation(width) ⇒ Object

Switch horizontal to vertical orientation



33
34
35
36
37
38
39
40
41
# File 'lib/bio/graphics/image_map.rb', line 33

def flip_orientation(width)
  @elements.each do |element|
    left, top, right, bottom = element.left, element.top, element.right, element.bottom
    element.left = top
    element.top = width - right
    element.right = bottom
    element.bottom = width - left
  end
end