lib/vedeu/interfaces/clear.rb in vedeu-0.6.65 vs lib/vedeu/interfaces/clear.rb in vedeu-0.6.66

- old
+ new

@@ -135,15 +135,15 @@ # @return [String] def optimised_output Vedeu.timer("Optimised clearing #{clearing}: '#{name}'".freeze) do height.times.map do |iy| [ - Vedeu::Geometries::Position.new(y + iy, x).to_s, + position(y + iy, x), colour.to_s, chars, ].join - end.join + Vedeu::Geometries::Position.new(y, x).to_s + end.join + position(y, x) end end # For each visible line of the interface, set the foreground and # background colours to those specified when the interface was @@ -171,9 +171,14 @@ else 'interface'.freeze end + end + + # @return [Vedeu::Geometries::Position] + def position(pos_y, pos_x) + Vedeu::Geometries::Position.new(pos_y, pos_x).to_s end # @return [Fixnum] def width @width ||= if content_only?