I've got some object whose notebook representation I make with Compose.jl.

I have

draw_object(obj) = draw(SVGJS(100, 100), compose(...))

How do I turn that into a `writemime` method? So far I have

function Base.writemime(st::IO, ty::MIME"image/png", obj::Object)
    draw_object(obj)
end

but I'm ignoring `st`. It works but yields a "broken image" in my notebook, 
and it's clearly not The Right Way. The call to `draw` is important because 
it gives it a nice square representation, and it would look ugly otherwise.

Cédric

Reply via email to