adjust the rendering of 2htdp/image examples in the docs to add an extra
pixel on the right and bottom so outline shapes look reasonable closes PR 12313
This commit is contained in:
parent
9d371153fd
commit
6228bc826e
|
@ -17,6 +17,24 @@
|
|||
@(interaction-eval #:eval img-eval (require 2htdp/image))
|
||||
@(interaction-eval #:eval img-eval (require lang/posn))
|
||||
|
||||
@(interaction-eval
|
||||
#:eval
|
||||
img-eval
|
||||
(let ([ce (current-eval)])
|
||||
(define (adjust-image i)
|
||||
(if (image? i)
|
||||
(overlay/xy i
|
||||
0 0
|
||||
(rectangle
|
||||
(+ (image-width i) 1)
|
||||
(+ (image-height i) 1)
|
||||
'solid
|
||||
(color 0 0 0 0)))
|
||||
i))
|
||||
(current-eval
|
||||
(λ (exp)
|
||||
(adjust-image (ce exp))))))
|
||||
|
||||
@(define-syntax-rule
|
||||
(image-examples exp ...)
|
||||
(examples #:eval img-eval exp ...))
|
||||
|
|
Loading…
Reference in New Issue
Block a user