   _render: (domain)->
     scale = exp(floor(log(16/domain.diagnal())/ln2)*ln2)
 
-    @save()
-    @beginPath()
-    self.transform().apply @context
+    @context.save()
+    @context.beginPath()
+    @transform().apply @context
 
     for i in [floor(domain.x0*scale)..ceil(domain.x1*scale)]
       if i == 0

    expr = @expression
    valid = (v)-> v >= domain.y0 and v <= domain.y1

    @begin()
    for s in [0..(1<<2)-1]
      @_loop domain.x0, domain.x1, 1<<8, 1<<12, expr.bind(null, s), valid
      @stroke @color, 3
    @end()

class Stack extends Element
  constructor: ->

  _render: (domain)->
    scale = exp(floor(log(16/domain.diagnal())/ln2)*ln2)

    @context.save()
    @context.beginPath()
    @transform().apply @context

    @context.moveTo 0, domain.y0
    @context.lineTo 0, domain.y1
