Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pict-lib/pict/private/pict.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,13 @@

(define (panorama p)
(let-values ([(x1 y1 x2 y2 ay dy) (panorama-box! p)])
(let ([h (- y2 y1)])
(place-over (blank (- x2 x1) h (- h ay) dy)
(- x1) (- y2 (pict-height p))
p))))
(place-over (blank (- x2 x1)
(- y2 y1)
(- y2 ay)
(- dy y1))
(- x1)
(- y2 (pict-height p))
p)))

(define (clip-descent b)
(let* ([w (pict-width b)]
Expand Down
5 changes: 5 additions & 0 deletions pict-test/tests/pict/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@
(check-equal? (pict-width (rotate (rectangle 10 10) pi))
(pict-width (panorama (rotate (rectangle 10 10) pi))))

;; check panorama descent calculation (racket/pict#63)
(let ()
(define p (panorama (pin-over (hline 40 2) 36 -4 (arrowhead 10 0))))
(check-equal? (pict-descent p) 0))

;;;; contract tests

(test-case "dingbats-contracts"
Expand Down