Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!iuvax!pur-ee!j.cc.purdue.edu!h.cc.purdue.edu!s.cc.purdue.edu!u-jmolse From: u-jmolse@cs.utah.edu (John M. Olsen) Newsgroups: comp.binaries.amiga Subject: v02i011: Amiga line drawing demo (executable) Message-ID: <885@s.cc.purdue.edu> Date: Sat, 5-Sep-87 15:55:27 EDT Article-I.D.: s.885 Posted: Sat Sep 5 15:55:27 1987 Date-Received: Sun, 6-Sep-87 08:19:00 EDT Sender: doc@s.cc.purdue.edu Followup-To: comp.binaries.amiga Organization: Purdue University Computing Center Lines: 253 Approved: doc@s.cc.purdue.edu (Craig Norborg) Archive-Name: linedraw.uu.sh [In this file is the executable, the data and the source are in the sources group. ] Here is a line drawing demo that I slapped together to read some data I saw posted to the net. The data is a mercator projection of the USA. /| | /||| /\| | John M. Olsen \|()|\|\_ |||. \/|/)@|\_ | 1547 Jamestown Drive | | Salt Lake City, UT 84121-2051 u-jmolse@ug.utah.edu or ...!{seismo,ihnp4}!utah-cs!utah-ug!u-jmolse # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # README # LineDrawer.uu # This archive created: Sat Sep 5 14:49:33 1987 # By: Craig Norborg (Purdue University Computing Center) cat << \SHAR_EOF > README 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 . 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 . Draw a line from current position to x,y. 3 . Move pen to position x,y. 4 . Foreground pen color. 5 . Background pen color. 6 . Line pattern. This is an unsigned word 0 to 65536 (0 to $ffff) 7 . 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. SHAR_EOF cat << \SHAR_EOF > LineDrawer.uu begin 600 LineDrawer M #\P # ( :> S $ /I &GD[Z"TA, M:6YE1')A=V5R(&)Y($IO:&X@32X@3VQS96X@5C$N, 3E7_K$IM AF"C\\ M %.NA;^5$](>@#P(&T "B\H 1.N@H<4$\K0/^L9@H_/ !3KH6W%1/+RW_ MK$ZZ$JQ83TAX "!(>@#"3KH9(E!/*4"#*F< *9(> @2'H O4ZZ&0Q03RE M@R9G "&2&R DZZ&=)83RE @QYG:B\M H_+0 (3KH IEQ/2JR#(F8D(&R# M'B\H %9.NAD$6$\I0(,B(&R#'B\H %9.NABP6$\I0(,B(&R#(@RH " 4 M9Q O+(,B3KH8N%A/0JR#(F"J+RR#(DZZ&*A83R\L@QY.NAE66$\O+(,F3KH8 M+EA/+RR#*DZZ&"183T)G3KH6$%1/3EU.=7( 9W)A<&AI8W,N;&EB0!I M;G1U:71I;VXN;&EB0 3E7_>"!L@QXK: R_]Q"IR\M_]Q.NAC 4$]( M> !+RW_W$ZZ&()03T*G+RW_W$ZZ&(903TAZ FX@;0 *+R@ !$ZZ"-!03RM M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$#5[(+P2D1M"KAL@M!L!$J29A Y M? "@N)P_TS?!#!.74YU,"H !,!\ -F"CE\ 6"XG#_8.1P # M XO "\M M HO$DZZ F)/[P ,*@"PO/____]F#$ZZ ? Y0(+B 4!>"L 4" " @(" @(" @(# P,# P(" @(" @(" @ M(" @(" @(" @D$! 0$! 0$! 0$! 0$! 0 P,# P,# P,# Q 0$! 0$! "0D) M"0D) 0$! 0$! 0$! 0$! 0$! 0$! 0% 0$! 0$ *"@H*"@H" @(" @(" @(" M @(" @(" @(" D! 0$ @ $ 0 M ! 0 $ 0( ! M M M M M M M M L !0 /L 0 : _( /K 0 _( end SHAR_EOF # End of shell archive exit 0