       for decoration in highlightDecorations
         @drawHighlightDecoration(context, decoration, y, screenRow, lineHeight, charWidth, canvasWidth)
 
-
     context.fill()
 
   drawToken: (context, text, color, x, y, charWidth, charHeight) ->

    color = @retrieveStyleFromDom(token.scopes, 'color')
    @transparentize(color, @getTextOpacity())

  getTokenColor: (token) ->
    #Retrieve color from cache if available
    flatScopes = token.scopes.join()
    if flatScopes not of @tokenColorCache
      color = @retrieveTokenColorFromDom(token)
      @tokenColorCache[flatScopes] = color
    @tokenColorCache[flatScopes]

  retrieveDecorationColorFromDom: (decoration) ->
    @retrieveStyleFromDom(decoration.getProperties().scope.split(/\s+/), 'background-color')

  getDecorationColor: (decoration) ->
    properties = decoration.getProperties()
    return properties.color if properties.color?
    if properties.scope not of @decorationColorCache
      color = @retrieveDecorationColorFromDom(decoration)
      @decorationColorCache[properties.scope] = color
    @decorationColorCache[properties.scope]


    out

  drawLines: (context, firstRow, lastRow, offsetRow) ->
    return if firstRow > lastRow

    screenRow = 0 if isNaN(screenRow)
    screenRow

  getClientRect: ->
    canvas = @lineCanvas[0]
    {
      width: canvas.scrollWidth,
      height: @getMinimapHeight()
    }

  pixelPositionForScreenPosition: (position) ->
    {row, column} = @buffer.constructor.Point.fromObject(position)
    actualRow = Math.floor(row)

    {top: row * @getLineHeight(), left: column}

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

  getDefaultColor: ->
    @transparentize(@minimapView.editorView.css('color'), @getTextOpacity())

  getTokenColor: (token) ->
    #Retrieve color from cache if available
    flatScopes = token.scopes.join()
    if flatScopes not of @tokenColorCache
      color = @retrieveTokenColorFromDom(token)
      @tokenColorCache[flatScopes] = color
    @tokenColorCache[flatScopes]

  getDecorationColor: (decoration) ->
    properties = decoration.getProperties()
    return properties.color if properties.color?
    if properties.scope not of @decorationColorCache
      color = @retrieveDecorationColorFromDom(decoration)
      @decorationColorCache[properties.scope] = color
    @decorationColorCache[properties.scope]

  # This function insert a dummy token element in the DOM to compute its style,
  # return the specified property, and remove the element from the DOM.
