closes PR 10930
This commit is contained in:
parent
451961e596
commit
bae79dda0b
|
@ -103,7 +103,7 @@
|
|||
(printf "image-gen: didn't find any images; probably this means that you need to delete .zo files and try again\n")]
|
||||
[else
|
||||
(printf "\n")
|
||||
(call-with-output-file "image-toc.ss"
|
||||
(call-with-output-file "image-toc.rkt"
|
||||
(λ (port)
|
||||
(fprintf port "#lang scheme/base\n(provide mapping)\n")
|
||||
(fprintf port ";; this file is generated by image-gen.ss -- do not edit\n;; note that the file that creates this file depends on this file\n;; it is always safe to simply define (and provide) mapping as the empty list\n\n")
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
(list '(image-baseline (rectangle 100 100 "solid" "black")) 'val 100)
|
||||
(list '(image-height (text "Hello" 24 "black")) 'val 24)
|
||||
(list '(image-baseline (text "Hello" 24 "black")) 'val 18)
|
||||
(list '(image-height (rectangle 10 0 "solid" "purple")) 'val 0)
|
||||
(list
|
||||
'(image-height
|
||||
(overlay (circle 20 "solid" "orange") (circle 30 "solid" "purple")))
|
||||
|
@ -17,6 +18,7 @@
|
|||
60)
|
||||
(list '(image-height (circle 30 "solid" "orange")) 'val 60)
|
||||
(list '(image-height (ellipse 30 40 "solid" "orange")) 'val 40)
|
||||
(list '(image-width (rectangle 0 10 "solid" "purple")) 'val 0)
|
||||
(list
|
||||
'(image-width
|
||||
(beside (circle 20 "solid" "orange") (circle 20 "solid" "purple")))
|
||||
|
|
|
@ -848,22 +848,24 @@ the parts that fit onto @scheme[scene].
|
|||
|
||||
@section{Image Properties}
|
||||
|
||||
@defproc[(image-width [i image?]) (and/c integer? positive? exact?)]{
|
||||
@defproc[(image-width [i image?]) (and/c integer? (not/c negative?) exact?)]{
|
||||
Returns the width of @scheme[i].
|
||||
|
||||
@image-examples[(image-width (ellipse 30 40 "solid" "orange"))
|
||||
(image-width (circle 30 "solid" "orange"))
|
||||
(image-width (beside (circle 20 "solid" "orange")
|
||||
(circle 20 "solid" "purple")))]
|
||||
(circle 20 "solid" "purple")))
|
||||
(image-width (rectangle 0 10 "solid" "purple"))]
|
||||
}
|
||||
|
||||
@defproc[(image-height [i image?]) (and/c integer? positive? exact?)]{
|
||||
@defproc[(image-height [i image?]) (and/c integer? (not/c negative?) exact?)]{
|
||||
Returns the height of @scheme[i].
|
||||
|
||||
@image-examples[(image-height (ellipse 30 40 "solid" "orange"))
|
||||
(image-height (circle 30 "solid" "orange"))
|
||||
(image-height (overlay (circle 20 "solid" "orange")
|
||||
(circle 30 "solid" "purple")))]
|
||||
(circle 30 "solid" "purple")))
|
||||
(image-height (rectangle 10 0 "solid" "purple"))]
|
||||
}
|
||||
|
||||
@defproc[(image-baseline [i image?]) (and/c integer? positive? exact?)]{
|
||||
|
|
Loading…
Reference in New Issue
Block a user