-
-
Notifications
You must be signed in to change notification settings - Fork 37
Description
NOTE Pull request #67 introduced the arrow and arrow3d renders
Arrows in drawn by the arrow3d are not clipped when the start is outside the plot area but the end is inside the area. This is visible in the following example: https://github.com/racket/plot/blob/master/plot-test/plot/tests/PRs/test-data/pr42-2-2.png
Source for the test data is at:
plot/plot-test/plot/tests/PRs/42.rkt
Line 59 in 4415b2d
| (arrows3d '((0 4 0) (2 4 0)) #:color 2 #:width 3 #:label "start OUT, end IN") |
This is probably caused by the change here:
plot/plot-lib/plot/private/plot3d/plot-area.rkt
Line 1519 in 4415b2d
| (when (and v1 v2 (or draw-outside? (in-bounds? v1))) |
When the draw-outside? parameter is #t, the line arrow is drawn even if the start is outside. Note that there is a check there for the end of the arrow, and if the end is outside, the arrow drawing is replaced with put-line which presumably clips the line correctly. We need to add line clipping for the start as well.