From c8de4feb0936b8597a20f77501eafa827cd126ba Mon Sep 17 00:00:00 2001 From: Josef Heinen Date: Sat, 13 Feb 2016 08:25:44 +0100 Subject: [PATCH] Fill workstation background instead of viewport --- src/backends/gr.jl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/backends/gr.jl b/src/backends/gr.jl index f5e2ae1bb8..dc6d5adfa6 100644 --- a/src/backends/gr.jl +++ b/src/backends/gr.jl @@ -69,6 +69,16 @@ function gr_display(plt::Plot{GRPackage}, clear=true, update=true, viewport[4] = subplot[3] + 0.95 * (subplot[4] - subplot[3]) end + if haskey(d, :background_color) + GR.savestate() + GR.selntran(0) + GR.setfillintstyle(GR.INTSTYLE_SOLID) + GR.setfillcolorind(gr_getcolorind(d[:background_color])) + GR.fillrect(0, 1, 0, 1) + GR.selntran(1) + GR.restorestate() + end + extrema = zeros(2, 4) num_axes = 1 cmap = false @@ -172,13 +182,6 @@ function gr_display(plt::Plot{GRPackage}, clear=true, update=true, end GR.setwindow(xmin, xmax, ymin, ymax) - if axis == 1 && haskey(d, :background_color) - GR.savestate() - GR.setfillintstyle(GR.INTSTYLE_SOLID) - GR.setfillcolorind(gr_getcolorind(d[:background_color])) - GR.fillrect(xmin, xmax, ymin, ymax) - GR.restorestate() - end GR.setscale(scale) if axes_2d