[plt-scheme] scrolling and painting

From: pedro pinto (pedro.e.pinto at gmail.com)
Date: Mon Sep 5 12:19:04 EDT 2005

Hi there,
 I have a large image which I want to show in a canvas. I have used double 
buffering, i.e. I draw the entire thing onto a bitmap and copy the bitmap to 
screen on the paint callback. Unfortunately I still some flickering when I 
scroll the canvas. 
 I allocate the bitmap thus:
 (send my-bitmap-dc set-bitmap
(make-object bitmap% size-x size-y #f))
 and copy it to the scree like this:
 (send (send my-canvas get-dc) draw-bitmap
(send my-bitmap-dc get-bitmap)
0 0)
 I am using auto-scrollbars, i.e. when I need to recompute the images, 
besides painting on onto the bitmap I do:
 (send my-canvas init-auto-scrollbars
size-x size-y)
 Is there anything I can do to improve the smoothness of the scrolling?
 Additionally, when using init-auto-scrollbars how can I tell what the 
scroll position is?
 Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20050905/b077bcb2/attachment.html>

Posted on the users mailing list.