Skip to content

Commit

Permalink
Don't call start-renderer when there are no renderers (#79, #49)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeket authored Sep 23, 2020
1 parent 61afacb commit ba879fc
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions plot-lib/plot/private/no-gui/plot2d-utils.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@

(for ([rend (in-list renderer-list)])
(match-define (renderer2d rend-bounds-rect _bf _tf label-proc render-proc) rend)
;; next step could be moved into (when render-proc, but this generates different step files)
(send area start-renderer (if rend-bounds-rect
(rect-inexact->exact rend-bounds-rect)
(unknown-rect 2)))
(when render-proc
(send area start-renderer (if rend-bounds-rect
(rect-inexact->exact rend-bounds-rect)
(unknown-rect 2)))
(render-proc area)))

(send area end-renderers)
Expand Down
7 changes: 3 additions & 4 deletions plot-lib/plot/private/no-gui/plot3d-utils.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@

(for ([rend (in-list renderer-list)])
(match-define (renderer3d rend-bounds-rect _bf _tf label-proc render-proc) rend)
;; next step could be moved into (when render-proc, but this generates different step files)
(send area start-renderer (if rend-bounds-rect
(rect-inexact->exact rend-bounds-rect)
(unknown-rect 3)))
(when render-proc
(send area start-renderer (if rend-bounds-rect
(rect-inexact->exact rend-bounds-rect)
(unknown-rect 3)))
(render-proc area)))

(send area end-renderers)
Expand Down
Binary file modified plot-test/plot/tests/test-data/p2d-4.dat
Binary file not shown.
Binary file modified plot-test/plot/tests/test-data/p2d-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plot-test/plot/tests/test-data/tt-24.dat
Binary file not shown.
Binary file modified plot-test/plot/tests/test-data/tt-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plot-test/plot/tests/test-data/tt-30.dat
Binary file not shown.
Binary file modified plot-test/plot/tests/test-data/tt-30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ba879fc

Please sign in to comment.