Best way to refresh screen

prothero at earthednet.org prothero at earthednet.org
Mon Sep 30 19:36:20 EDT 2013


This seems like it should be easy, but I can't find anything in the documentation.

I have a large map image that I want to draw onto. I have defined a viewport, which is a graphic rectangle and all parts of the map that are not within the viewport are hidden. The large map will move around, magnify, etc. This all works. I want to draw symbols on the visible part of the map, and in order to make this efficient, I take a snapshot of the part of the map that's in the viewport and will use that for the symbols. 

To do the snapshot, I first set the visible of the snapshot image to false, take the snapshot of the map, then set the visible of the snapshot image to true.

Set the visible of snapShotImage to FALSE
take snapshot -- this takes the snapshot of the snapsShotImage
Set the visible of the snapShotImage to TRUE --this does not refresh the screen. 

I can get it to work if I do:
Set the visible of snapShotImage to FALSE
take snapshot -- this works
wait 0.2 seconds
Set the visible of the snapShotImage to TRUE --this does refresh the screen

Is this the best way to force a screen refresh???

Bill

William Prothero
http://es.earthednet.org







More information about the use-livecode mailing list