#lang racket/gui (define bitmap (make-parameter #f)) (define dc (make-parameter #f)) (define path (make-parameter #f))
(parameterize* ((bitmap (make-bitmap 500 500 #f)) (dc (let ((temp (new bitmap-dc% (bitmap (bitmap))))) (send temp set-pen "black" 2 'solid) temp)) (path (new dc-path%))) (define frame (new frame% [min-width (send (bitmap) get-width)] [min-height (send (bitmap) get-height)] [label "test"])) (send (path) move-to 50 50) (send (path) line-to 250 250) (send (dc) draw-path (path)) (define canvas (new canvas% [parent frame])) (send (send canvas get-dc) draw-bitmap (bitmap) 0 0) (send frame show #t)) I don't know what i am doing wrong, the bitmap is drawn, if i return it i get the line all fine, the problem is that the frame either doesn't get updated or never tries to draw. Is this a bug in canvas% or am I doing something terribly wrong?
____________________ Racket Users list: http://lists.racket-lang.org/users