(define image-box (new canvas% [parent frame] [min-width 300] [min-height 300]))
I'm still trying to figure out how the racket/gui library works but I'm having some difficulty understanding how to have an image fill a canvas. I'd like for instance to have a canvas in my gui that is 300x300 and have any image I load resized to fit those dimensions. (send (send image-box get-dc) draw-bitmap (read-bitmap (string->path (send list-box get-string select))) 0 0)))))) Here I have some quickly thrown together code for selecting a list of pathnames to images from a list-box. The images are all different sizes and usually end up exceeding the canvas size. I've looked around the documentation, especially in the racket/draw module but I can't find anything beyond a "scale" which doesn't really seem all that helpful. If anyone knows how to change images to certain sizes that'd be helpful. I tried looking at racket/pict too but that doesn't seem to have anyway to absolutely set a image's dimensions. Thanks! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.