Commit 1039488b authored by Robert Ricci's avatar Robert Ricci

Break out screenshot into a function that can be used by itself

parent f566cdf9
......@@ -28,14 +28,18 @@
(string-append (number->string howmany) " nodes"))
properties))))
(define (instructionstep step #:screenshot [screenshot #f] . body)
(define (screenshot path)
(let* ([fullpath (string-append "screenshots/" path)]
[b (make-object bitmap% fullpath)]
[width (send b get-width)]
[scale-factor (/ screenshot-width width)])
(list (image #:scale scale-factor fullpath fullpath) (linebreak))))
(define (instructionstep step #:screenshot [screenshot-path #f] . body)
(item (bold (decode-content (list step)))
(linebreak)
(if screenshot
(let* ([path (string-append "screenshots/" screenshot)]
[b (make-object bitmap% path)]
[width (send b get-width)]
[scale-factor (/ screenshot-width width)])
(list (image #:scale scale-factor path screenshot) (linebreak)))
(if screenshot-path
(screenshot screenshot-path)
(void))
(decode-content body)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment