# HG changeset patch # User Tuomo Valkonen # Date 1606931683 18000 # Node ID 7ee6be1823e805563eadc272ddf005b7c497b26f # Parent 4a2c4ee2785870899b6b4d76c55f124f5c8862bb windowsize parameter diff -r 4a2c4ee27858 -r 7ee6be1823e8 src/Visualise.jl --- a/src/Visualise.jl Wed Dec 15 10:36:43 2021 +0200 +++ b/src/Visualise.jl Wed Dec 02 12:54:43 2020 -0500 @@ -84,7 +84,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() @@ -96,7 +96,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) @@ -125,7 +127,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