GR: 3D, warn on invalid rotation or tilt

This commit is contained in:
t-bltg 2021-07-01 14:02:30 +02:00
parent bba971f7ea
commit 1ddc673201

View File

@ -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]))