Search code examples
graphicswindowjuliagtkcairo

Show Layered.jl canvas as a new window


I know you can save the Canvas as a PNG/SVG/PDF in Layered.jl, but how would I display it in a new window. I know this is possible with Cairo (which is what Layered.jl is based on) and a Gtk Window.


Solution

  • If you have alredy saved the original canvas as an svg or pdf file, you can then load it to another canvas such as canvas = Canvas(300, 400) with draw_svg(canvas, "filename.svg") or draw_pdf(canvas, "filename.pdf"). See the drawing.jl file in the Layered.jl distribution.