# File lib/sparklines.rb, line 185
  def area

    step = @options[:step].to_f
    height = @options[:height].to_f
    background_color = @options[:background_color]

    create_canvas((@norm_data.size - 1) * step + 4, height, background_color)

    upper = @options[:upper].to_f

    has_min = @options[:has_min]
    has_max = @options[:has_max]
    has_last = @options[:has_last]

    min_color = @options[:min_color]
    max_color = @options[:max_color]
    last_color = @options[:last_color]
    below_color = @options[:below_color]
    above_color = @options[:above_color]


    coords = [[0,(height - 3 - upper/(101.0/(height-4)))]]
    i=0
    @norm_data.each do |r|
      coords.push [(2 + i), (height - 3 - r/(101.0/(height-4)))]
      i += step
    end
    coords.push [(@norm_data.size - 1) * step + 4, (height - 3 - upper/(101.0/(height-4)))]

    # TODO Refactor! Should take a block and do both.
    #
    # Block off the bottom half of the image and draw the sparkline
    @draw.fill(above_color)
    @draw.define_clip_path('top') do
      @draw.rectangle(0,0,(@norm_data.size - 1) * step + 4,(height - 3 - upper/(101.0/(height-4))))
    end
    @draw.clip_path('top')
    @draw.polygon(*coords.flatten)

    # Block off the top half of the image and draw the sparkline
    @draw.fill(below_color)
    @draw.define_clip_path('bottom') do
      @draw.rectangle(0,(height - 3 - upper/(101.0/(height-4))),(@norm_data.size - 1) * step + 4,height)
    end
    @draw.clip_path('bottom')
    @draw.polygon(*coords.flatten)

    # The sparkline looks kinda nasty if either the above_color or below_color gets the center line
    @draw.fill('black')
    @draw.line(0,(height - 3 - upper/(101.0/(height-4))),(@norm_data.size - 1) * step + 4,(height - 3 - upper/(101.0/(height-4))))

    # After the parts have been masked, we need to let the whole canvas be drawable again
    # so a max dot can be displayed
    @draw.define_clip_path('all') do
      @draw.rectangle(0,0,@canvas.columns,@canvas.rows)
    end
    @draw.clip_path('all')

    drawbox(coords[@norm_data.index(@norm_data.min)+1], 1, min_color) if has_min == true
    drawbox(coords[@norm_data.index(@norm_data.max)+1], 1, max_color) if has_max == true

    drawbox(coords[-2], 1, last_color) if has_last == true

    @draw.draw(@canvas)
    @canvas
  end