DrawScript at London user group / Mon 16th July 2018
Bryan Hogan (339) 589 posts |
The next meeting of the RISC OS User Group Of London will be: DrawScript, presented by David Lane Monday 16th July 2018, 7.45pm The Blue-Eyed Maid (upstairs in the restaurant) http://www.rougol.jellybaby.net/ DrawScript is a programming (or script) language for producing line-drawings in Draw format. The language used is BASIC extended with extra graphics commands. DrawScript is capable of producing much more elaborate drawings than could be created manually only using a mouse, as shown by the examples in the DrawScript gallery. http://drawscript.jettons.co.uk/drawscriptold/index.html David will describe in more detail what DrawScript is and what it does, demonstrating some simple examples that come with the software as well as some of his own programs. Uses of DrawScript will be given and some bugs discussed. DrawScript and BASIC programs that relate to one of the many proofs of the rectangular tiling theorem will be demonstrated. No preparation or knowledge of DrawScript is necessary as all will be explained. If, however, you have the program you are encouraged to experiment and suggest your own uses. A question from David: Can you get DrawScript to produce more than one Draw file from one program? More info here – http://rougol.jellybaby.net/meetings/index.html ROUGOL’s venue is easy to reach by public transport from in and around London and the south east: ROUGOL meetings take over the pub’s upstairs restaurant for the evening. Entry is free, food & drink plentiful (but not free!). |
Clive Semmens (2335) 3276 posts |
I hope to be there. With luck I may have been playing with DrawScript by then…I wonder whether there will be interesting ways to combine using it with using my various drawfile editing programs (one of which I’m upgrading at the moment)… |
Clive Semmens (2335) 3276 posts |
I’ve been playing with DrawScript a bit… If anyone wants a look at the (horribly uncommented & with meaningless variable names) little script I’ve written, be my guest – it’s at http://clive.semmens.org.uk/RISCOS/PrimeSpiral – just set its type to b9b and (assuming you’ve got DrawScript) run it… A little question – I couldn’t see how to stop a path being filled. The final white spiral on top of everything is made of 2,500 separate short lines, because when it was a single line it had a black fill, that being the last fill colour I’d used. How do you get rid of a fill colour?? My manky workaround wouldn’t work with curved lines. |
nemo (145) 2529 posts |
DrawFile uses -1 to mean ‘no colour’, so set fill colour to -1. |
Clive Semmens (2335) 3276 posts |
I tried that. I know what Drawfile does – I’ve written apps that generate drawfiles myself. But no, didn’t work – it fills white, presumably only taking notice of the top three bytes for fill colour… |
Clive Semmens (2335) 3276 posts |
But… d’uh …your post makes me look at my program again, and it’s a different error that’s the cause of the trouble, and indeed putting Fill(-1) does work. Stupidity: to shorten the data in my palette, I was only putting the top three bytes in, and then shifting them left a byte at the point of use…which oddly enough does turn -1 into &FFFFFF00, which is white… Now working without the manky workaround. |
nemo (145) 2529 posts |
The words ‘quart’ and ‘pint-pot’ come to mind. |
Clive Semmens (2335) 3276 posts |
8~) Something like that. Since I’m only using 16 different colours, I put all the palette into an array like this:
which is fine – except that -1 shifted left a byte is a bit sad and sorry but I’m not ashamed. Well, not much. (DrawScript is basically BASIC with a some nice procedures that don’t need to appear in the script.) |
David R. Lane (77) 766 posts |
Hello Clive. I will show your Primespiral tonight at ROUGOL. |