home *** CD-ROM | disk | FTP | other *** search
- Documentation for Acorn Archimedes extension routines
- -----------------------------------------------------
-
- Preamble
- --------
- As it stands, GNU Scheme is a useful LISP type language - providing a number
- of useful functions for symbolic computation and functional programming.
- However it does not really provide many good ways of interacting with the
- underlying operating-system on the archimedes; thus a small set of routines
- were added on to provide some more fun functions - as well as allowing
- the user to write Scheme to perform the likes of L-systems plotting and
- turtle graphics moderately painlessly.
-
-
- List of functions provided
- --------------------------
- (mode <n>) Changes the video mode to 'n'
-
- (vdu25 <type> <x> <y>) Performs generalised plot command
-
- (vdu29 <x> <y>) Changes the graphics origin
-
- (graphics-origin! <x> <y>) Ditto but a more obvious name
-
- (text-cursor! <x> <y>) Moves the text cursor to position x,y
-
- (remove-cursor!) Removes the cursors
-
- (restore-cursor!) Restores the cursors
-
- (plot <type> <x> <y>) Does as per vdu25 but via only one call to
- OS_Plot SWI
-
- (move <x> <y>) Does a graphics cursor move to x,y
-
- (point <x> <y>) Puts a point at x y
-
- (circle <x> <y> <rad>) Draws a circle of radius rad at x,y
-
- (wait) Waits for the next vsync event
-
- (gcol <a> <c>) Performs plotting action 'a' with colour 'c'
-
- (cls) Clear text screen
-
- (clg) Clear graphics screen
-
- (text-colour! <n>) Sets the text colour to 'n'
-
- (fill <x> <y>) Flood fill from x,y - same as plot 133
-
- (draw <x> <y>) Draws to x y from where you are currently
-
- (vdu <n>) Does vdu n ;-)
-
- (get) Waits for a keypress (handy for pausing after
- drawing has been plotted)
-
-
- All of the above are written in C and linked into the interpreter at compile
- time. However - due to these being fairly useful to write other routines,
- I've written a few other routines in scheme that provide nearly all the other
- graphics primitives that you might like to play with - these are present in
- <scm$dir>.arc_ext and are as follows :
-
-
- (paged-on) Switches on paged output - try using (terms)
-
- (paged-off) Switches it off again
-
- (text-window x1 y1 x2 y2) Defines a text window
-
- (graphics-window x1 y1 x2 y2) Defines a graphics window
-
- (home-text-cursor) Obvious
-
- (default-windows) Ditto
-
- (default-colours) Ditto
-
- (move-by x y) Relative version of 'move'
-
- (point-by x y) Relative version of 'point'
-
- (draw-by x y) Relative version of 'draw'
-
- (line x1 y2 x2 y2) Draws a line from x1,y1 to x2,y2
-
- (circle-fill x y rad) Plots a filled circle at x,y of radius rad
-
- (rectangle-fill x y w h) Plots a filled rectangle
-
- (rectangle x y w h) Plots an outline rectangle
-
-
- Using the functions
- -------------------
- Ahem. Well I've included a couple of drawing demos in !Scm.scm.arc_demos;
- but due to my lack of graphical talent thats about it - surely someone else
- can knock up a few odds and ends?
-
- If you have problems figuring out what to feed the functions as arguments
- then I'd suggest picking up the Basic manual which has exactly the same
- primitives generally, failing that peer at the prms.
-
-
- Known problems
- --------------
- Actually. None.
- (Surely some mistake? ;-)
- If anyone runs up against any I'd love to know (I don't think I mean that
- either really but never mind)...
- The ones I'm looking for are messages back from SCM along the line of
-
- #@(Bus error
-
- results being returned from execution of function - if you can reproduce it
- along with a name of the function it happened in then I would be grateful of
- hearing of it. (I know why it does this..)
- There isn't a generic os_swi call that would allow you to (say) specify
- an integer and a list of ten numbers to pass to it.
- I'm considering this one - seeing as there so many possible types passable
- via the registers in a swi call I can see this becoming subject to the law
- of diminishing returns very quickly...
- However!
- If anyone wants a feature / function added then feel free to suggest away
- and I'll happily add it in (provided it isn't ludicrous.. - WIMP
- routines would be wonderful but hugely unpleasant in practice)
- The error checking is virtually non existant. Should do something about this
- really.
-
-
- Known features
- --------------
- (Not problems but never mind)
-
- You can totally screw up your display beyond aesthetic pleasance....
-
- (This isn't my fault - I'm only providing stuff with which to build neat
- graphics hacks)
-
-
- ams
- 13/6/94
-
- (I'm contactable via any of the means present in the release notes)