Method: Windows::Units::UnitConverter#convert
- Defined in:
- lib/windows/units/unit_converter.rb
#convert ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/windows/units/unit_converter.rb', line 34 def convert x, w = @x_axis.map do |el| item = recognize_unit(el) converter(item.unit).to(item.format, base: @width) end y, h = @y_axis.map do |el| item = recognize_unit(el) converter(item.unit).to(item.format, base: @height) end x = x + @x_offset y = y + @y_offset [x, y, w, h] end |