title: Render Gadfly plots directly to a Gtk canvas
body: <p>Is it possible to render a Gadfly plot directly to a canvas? I would like to develop a Julia GUI using gtk which renders Gadfly plots. </p>
  
  <p>I am hoping for something along the lines of:</p>
  
  <pre><code>some_plot = plot(x=[1,2,3],y=[4,5,6])
  draw(ctx::CairoContext, some_plot)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>draw(c::GtkCanvas, some_plot)
  </code></pre>
  
  <p>My current approach saves a png and then loads the image. Obviously not optimal:</p>
  
  <pre><code>ctx = getgc(canvas)
  canvas_w = width(canvas)
  canvas_h = height(canvas)
  
  save(ctx)
  set_source_rgb(ctx,1,1,1)
  rectangle(ctx,0,0,canvas_w,canvas_h)
  fill(ctx)
  restore(ctx)
  
  some_plot = plot(x=[1,2,3],y=[4,5,6])
  draw(PNG("myplot.png", 8inch, 4inch), some_plot)
  
  save(ctx)
  image = read_from_png("myplot.png")
  w = image.width
  h = image.height
  translate(ctx, canvas_w/2, canvas_h/2)
  scale(ctx, canvas_w/w, canvas_h/h)
  translate(ctx, -0.5*w, -0.5*h)
  set_source_surface(ctx, image, 0, 0)
  paint(ctx)
  restore(ctx)
  </code></pre>
  
  <p>Thank you</p>