Skip to content

Commit

Permalink
GR: 3D, warn on invalid rotation or tilt
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Jul 1, 2021
1 parent bba971f commit 1ddc673
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/backends/gr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,13 @@ function gr_draw_axes(sp, viewport_plotarea)
# set space
xmin, xmax, ymin, ymax = gr_xy_axislims(sp)
zmin, zmax = gr_z_axislims(sp)
GR.setspace(zmin, zmax, round.(Int, sp[:camera])...)

camera = round.(Int, sp[:camera])

warn_invalid(val) = if val < 0 || val > 90 @warn "camera: $(val)° ∉ [0°, 90°]" end
warn_invalid.(camera)

GR.setspace(zmin, zmax, camera...)

# fill the plot area
gr_set_fill(plot_color(sp[:background_color_inside]))
Expand Down

0 comments on commit 1ddc673

Please sign in to comment.