File tree Expand file tree Collapse file tree 6 files changed +30
-1
lines changed
plot-lib/plot/private/common Expand file tree Collapse file tree 6 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 3131 (: dys (Listof Real))
3232 (define dys (case anchor
3333 [(top-left top top-right) (list (- dist) (- height dist))]
34- [(left center right) (list (* -1/2 height) (* 1/2 width ))]
34+ [(left center right) (list (* -1/2 height) (* 1/2 height ))]
3535 [else (list (- dist height) dist)]))
3636
3737 (for*/list : (Listof (Vector Real Real)) ([dx (in-list dxs)] [dy (in-list dys)])
Original file line number Diff line number Diff line change 1+ #lang racket
2+ (require rackunit
3+ plot pict racket/runtime-path
4+ "../helpers.rkt " )
5+
6+ ; tests for PR#89, https://github.com/racket/plot/pull/89
7+ ; "fix calculation of text-extends for anchor 'right center left"
8+
9+ (define (do-plot output-fn)
10+ (parameterize ([plot-x-label #f ]
11+ [plot-y-label #f ])
12+ (output-fn
13+ (polar (lambda (t) 1 ))
14+ #:x-min 4025584149602844706/10000000000000000000
15+ #:x-max 4025584149602844712/10000000000000000000
16+ #:y-min 6805367900508167/10000000000000000
17+ #:y-max 6805367900508171/10000000000000000 )))
18+
19+ (define-runtime-path pr89 "./test-data/pr89.dat " )
20+
21+ (define pr86-test-suite
22+ (test-suite
23+ "PR#89: text-extents "
24+ (test-case "PR89: text-extents "
25+ (check-draw-steps do-plot pr89))))
26+
27+ (module+ test
28+ (require rackunit/text-ui)
29+ (run-tests pr86-test-suite))
You can’t perform that action at this time.
0 commit comments