def dynamic_image(f)
      #f,dummy=arguments
      @_image = lambda {|*args|
        c=f.js_apply(self,args)
        c.nil? ? pv.Color.transparent : (c.is_a?(String) ? Rubyvis.color(c) : c )
      }
      self
    end
def dynamic_image(f)
      #f,dummy=arguments
      @_image = lambda {|*args|
        c=f.js_apply(self,args)
        c.nil? ? pv.Color.transparent : (c.is_a?(String) ? Rubyvis.color(c) : c )
      }
      self
    end
@TODO: NOT IMPLEMENTED YET
 Specifies the dynamic image function. By default, no image function is
 specified and the <tt>url</tt> property is used to load a static image
 resource. If an image function is specified, it will be invoked for each
 pixel in the image, based on the related <tt>imageWidth</tt> and
 <tt>imageHeight</tt> properties.

 <p>For example, given a two-dimensional array <tt>heatmap</tt>, containing
 numbers in the range [0, 1] in row-major order, a simple monochrome heatmap
 image can be specified as:

   vis.add(pv.Image)
     .image_width(heatmap[0].length)
     .image_height(heatmap.length)
     .image(pv.ramp("white", "black").by(lambda {|x,y| heatmap[y][x]}))

 For fastest performance, use an ordinal scale which caches the fixed color
 palette, or return an object literal with <tt>r</tt>, <tt>g</tt>, <tt>b</tt>
 and <tt>a</tt> attributes. A {@link pv.Color} or string can also be returned,
 though this typically results in slower performance.