hi ,<br>What's the best between :<br><br>(define MY-CANVAS% <br> (class canvas% <br> (init-field <br> (buff (make-object bitmap% 1000 1000))<br> (Dbuffer (new bitmap-dc% [bitmap buff ] ))<br> (bitmap1 (make-object bitmap% "test.jpg")))<br>
<br> (inherit get-dc)<br> (define/override (refresh) <br> (send Dbuffer clear)<br> (send Dbuffer draw-bitmap bitmap1 0 0 'solid )<br> (send (get-dc) draw-bitmap Dbuffer 0 0))<br> <br> (define/override (on-paint) (send this refresh))<br>
(super-new)))<br><br>or like this:<br><br>(define buff (make-object bitmap% 1000 1000))<br>(define Dbuffer (new bitmap-dc% (bitmap buff)))<br>(define bitmap1 (make-object bitmap% "test.jpg"))<br><br>(define canvas (new canvas%<br>
(parent FRAME) <br> (paint-callback (ë (c dc)<br> (send Dbuffer clear)<br> (send Dbuffer draw-bitmap bitmap1 0 0 'solid )<br>
(send dc draw-bitmap Dbuffer 0 0)))))<br><br><br><br>I get the same result, but whicth method I must use ? <br>What is the most conventional?<br>