home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
064.lha
/
LineDrawer
/
LineDrawer.doc
< prev
next >
Wrap
Text File
|
1986-11-20
|
2KB
|
54 lines
This README file has been extracted from the comments in linedrawer.c, but
has a few clarifications.
LineDrawer by John M. Olsen. V1.0 July 5, 1987
John M. Olsen
1547 Jamestown Drive
Salt Lake City, UT 84121-2051
Network addresses:
u-jmolse@ug.utah.edu or ...!{seismo,ihnp4}!utah-cs!utah-ug!u-jmolse
This is public domain software. Do whatever you want with it.
Just don't complain to me when it breaks after a few hundred people
have hacked on it. :^)
This program takes a data file as a parameter and makes a line drawing
based on the commands in the file. The instruction format is listed
below. There should be two data files included. One is a Mercator
projection of the USA, and the other is a really short demo of how to use
the color changing and line patterning commands.
Manx Instructions:
cc LineDrawer.c
ln LineDrawer.o -lc
It should (no guarantees) work fine with Lettuce C since I used only
longs, and have (hopefully) everything type cast correctly.
Data file format:
lines may have white space just about anywhere. Each command line begins
with a number followed by a number of parameters. Any line not starting
with an appropriate number (after white space, if any) is considered to
be a comment. Lines may also have a comment after the data. No error
checking is done, so it is guaranteed to do strange things if the data is
messed up.
1 <minx> <miny> <maxx> <maxy>. Specify the range the coordinates fall into.
Reversing the miny and maxy will flip a picture vertically, making
the origin be at the bottom left corner instead of the top left.
2 <x> <y>. Draw a line from current position to x,y.
3 <x> <y>. Move pen to position x,y.
4 <color>. Foreground pen color.
5 <color>. Background pen color.
6 <pattern>. Line pattern. This is an unsigned word 0 to 65536 (0 to $ffff)
7 <mode>. This can change the way 4 to 6 appear by using only foreground,
or complimenting colors, etc. It can do some strange stuff.
The current (unguaranteed) values usable here are:
JAM1: 0
JAM2: 1
COMPLIMENT: 2
INVERSVID: 4
You can add these, so 3 = JAM2 and COMPLIMENT.