aUCBLogo Demos and Tests / makedemobmps


to makedemobmps
;setErrorAction [pause]
   
setSaveSize [400 300]
   
repeat count demolist 
   
[
      
makeDemoBMP_j=repcount+0
      
makeDemoBMPs_file=thisdemo makeDemoBMP_j
      
clearText
      
(pr makeDemoBMPs_file [demo nr.] makeDemoBMP_j)
      
catch "error [
         
catch "RunSecureTimer
         
[   (runSecure 
            
;security_dlcall
            ;+security_iodll
            ;+security_shell
            ;+security_filewrite 
            ;+security_fileread
            ;+security_dirs
            ;+security_thread
            ;+security_keyboard
            ;+security_gui
            ;+security_erase
            ;+security_buried
            ;+security_namespace
            
makeDemoBMPs_file
            
10000000   ;stack size (in bytes)
            
10000000   ;graphic record size (in graphic primitives)
            
100*1000*1000   ;memory size (in bytes)
            
655360   ;max. number of nodes
            
10000   ;timeout (in milliseconds)
            
)
         
]
      
]
      
err=Error
      
if err != [] 
      
[   show err 
;         pause
      
]
      
updateGraph
      
wait 0
      
dispatchMessages
      
filename=word makeDemoBMPs_file "_.png
      
ifelse (count GraphCurrent) > 16
      
[   saveScreen filename
      
][   saveImage ConsoleBitmap filename
      
]
      
updateVars
      
resetwem   ; without erasing makeDemoBMPs
   
]
end

to demolist
   
local [l f]
   
f=(Files [*.lg])
   
f=remove "makedemobmps.lg f
   
output f
end

to thisdemo start
   
local [l f]
   
f=(Files [*.lg])
   
f=remove "makedemobmps.lg f
   
l=replace ".lg " Item start f
   
output l
end

to resetwem
   
cd "D:/users/AndreasM/aUCBLogo
   
erase 
      
remove "makedemobmps 
      
remove "demolist
      
remove "thisdemo
      
remove "resetwem
      
procedures
   
erase buried
   
erase list [] 
;      remove "template_number
;         remove "foreach_template
;            remove "template_lists 
               
first bf Names
   
erase Tables
   
while [keyp][ignore readChar]
   
setCaseIgnored true
;   singleBuffer
   
clearScreen
   
setUpdateGraph true
   
setPenColor 0
   
setScreenColor 7
   
setFloodColor 0
   
setPenSize [1 1]
   
disableCylinderLines
   
enableLineSmooth
   
setLabelFont [Times]
   
showTurtle
   
PenDown
   
setLightAmbient rgb 0.1 0.1 0.1
   
setLightDiffuse rgb 1 1 1
   
unperspective
   
refresh
   
wrap
   
insertMode
   
disableTexture
   
disableShadows
   
clearShadows
end