# HG changeset patch # User Tuomo Valkonen # Date 1606931683 18000 # Node ID dcfc38ade15b0c168786352d48f46f7ed28948f3 # Parent 097f95638dbae5b7f1aa18456f44810ea0b97170 windowsize parameter diff -r 097f95638dba -r dcfc38ade15b src/Visualise.jl --- a/src/Visualise.jl Fri Oct 23 18:00:53 2020 -0500 +++ b/src/Visualise.jl Wed Dec 02 12:54:43 2020 -0500 @@ -89,7 +89,7 @@ GR.restorestate() end -function do_visualise(imgs; refresh=true, fullscreen=false) +function do_visualise(imgs; refresh=true, fullscreen=false, windowsize=nothing) n = length(imgs) # Get device dimensions in metres and pixels scrw, scrh, pw, ph = GR.inqdspsize() @@ -101,7 +101,9 @@ GR.setscale(0); GR.selntran(1) # - First OS window size - if fullscreen + if !isnothing(windowsize) + w, h = float.(windowsize) + elseif fullscreen w, h = float(scrw), float(scrh) elseif scrw/n>scrh w, h = float(sc*scrh*n), float(sc*scrh*imgaspect) @@ -130,7 +132,7 @@ x1 = x0-hh*(n/imgaspect) x2 = x0+hh*(n/imgaspect) GR.setviewport(x1, x2, canvas[3], canvas[4]) - end + end GR.setwindow(0, n, 0, 1) # Clear background # Plot images