1

I have a Racket program that generates a string of output text and an image:

#lang racket/gui
(define outstr "This is the output string")
(define frame (new frame%
                   [label "Example"]
                   [width 100]
                   [height 100]))
(new canvas% [parent frame]
             [paint-callback 
                 (lambda (canvas dc) 
                    (send dc draw-rectangle 20 20 30 30))])
(send frame show #t)

How can I have above program create a html file through scribble that has outstr and the rectangle image?

I was thinking of first creating a myscribble.scrbl file from this program and then using "system" function to send commands like "scribble myscribble.scrbl" to create html file. But even there how do I add above image created to the html file?

What is the best method to do this?

rnso
  • 23,686
  • 25
  • 112
  • 234

0 Answers0