     rgba
 
 
-  fill : (dimensions, rgba, alpha) ->
+  fillPasses : (dimensions, rgba, alpha) ->
 
     width = dimensions[0]
     height = dimensions[1]

    input :
      rgba: "Uint8Array"
      dimensions : '[]'
    threshold : "0-8"
    rounds : "0-5"
    fill : "true, false"
  EXAMPLES : [
      { description : "Smooth end and start segments with default values", lines :
        [ "time(start : 0, end : 10) ->"

  constructor : () ->


  execute : ({ input : { rgba, dimensions }, removeThreshold, removePasses, fillPasses, fillAlpha}) ->

    removeThreshold = 5 unless removeThreshold?   
    removePasses = 2 unless removePasses?
    fillPasses = 3 unless fillPasses?
    fillAlpha = "proportional" unless fillAlpha?

    for i in [0...removePasses] by 1
      @smooth(dimensions, rgba, removeThreshold)

    if removePasses > 0
      for i in [removeThreshold-1..1] by -1
        @smooth(dimensions, rgba, i)

    for i in [0..fillPasses-1] by 1
      
      if fillAlpha is "proportional"
        g = i / (fillPasses)
        t = 1 - (g * g * g)
        t = t * t * t
      else
        t = (1 / fillPasses) * (fillPasses - i)

      @fillPasses(dimensions, rgba, t)

    rgba

  smooth : (dimensions, rgba, removeThreshold) ->

    width = dimensions[0]
    height = dimensions[1]
