samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
def row_to_px row_number

    # Row 0 starts 5 units below the top of the grid.
    # Each row afterward is 20 units lower.
    grid.top.shift_down(5).shift_down(20 * row_number)
  end
# Sets position of each row
# Converts given row value to pixels that DragonRuby understands
Sets position of each row
Converts given row value to pixels that DragonRuby understands
Sets position of each row Converts given row value to pixels that DragonRuby understands
def row_to_px row_number
    grid.top.shift_down(5).shift_down(20 * row_number)
  end
def row_to_px row_number grid . top . shift_down ( 5 ) . shift_down ( 20 * row_number ) end
Sets position of each row
Converts given row value to pixels that DragonRuby understands
Sets position of each row Converts given row value to pixels that DragonRuby understands
# Row 0 starts 5 units below the top of the grid. # Each row afterward is 20 units lower.
row_number