Skip to content

Commit

Permalink
Fill workstation background instead of viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Feb 13, 2016
1 parent 03a9f00 commit c8de4fe
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/backends/gr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c8de4fe

Please sign in to comment.