       height: @getMinimapHeight()
     }
 
+  # Returns a pixel position corresponding to a character's screen
+  # position.
+  #
+  # position - A screen position {Object} with the following properties:
+  #            :row - The row {Number} of the character.
+  #            :column - The column {Number} of the character.
+  #
+  # Returns an {Object} with the following properties:
+  # :top - The position {Number} from top.
+  # :left - The position {Number} from left.
   pixelPositionForScreenPosition: (position) ->
     {row, column} = @buffer.constructor.Point.fromObject(position)
     actualRow = Math.floor(row)

  #    ##        ##    ##  ##     ## ##        ##    ##
  #    ##        ##     ##  #######  ##         ######

  getMinimapHeight: -> @getLinesCount() * @getLineHeight()

  getLineHeight: -> @lineHeight

  getCharHeight: -> @charHeight

  getCharWidth: -> @charWidth

  getTextOpacity: -> @textOpacity

  getLinesCount: -> @editorView.getEditor().getScreenLineCount()

  getMinimapScreenHeight: -> @minimapView.height() #/ @minimapView.scaleY

  getMinimapHeightInLines: -> Math.ceil(@getMinimapScreenHeight() / @getLineHeight())

  getFirstVisibleScreenRow: ->
    screenRow = Math.floor(@scrollTop() / @getLineHeight())
    screenRow = 0 if isNaN(screenRow)
    screenRow

  getLastVisibleScreenRow: ->
    calculatedRow = Math.ceil((@scrollTop() + @getMinimapScreenHeight()) / @getLineHeight()) - 1
    screenRow = Math.max(0, Math.min(@editor.getScreenLineCount() - 1, calculatedRow))
    screenRow = 0 if isNaN(screenRow)
    screenRow

  getClientRect: ->
    canvas = @lineCanvas[0]
    {

  # Performs an update of the minimap.
  update: =>
    return unless @editorView?

    #reset canvas virtual width/height
    @lineCanvas[0].width = @lineCanvas[0].offsetWidth
