home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pegasus Graphics Universe
/
Pegasus_Graphics_Universe.iso
/
p11
/
utils
/
hpraster.txt
< prev
next >
Wrap
Text File
|
1989-02-12
|
4KB
|
175 lines
\MOVE 'Y' TO #333
\MOVE 1 TO #332 ;FRAME # TO BE SHOWN
\MOVE 0 TO #334\MOVE 0 TO #335
\MOVE 0 TO #336 ;TELLS IF PTR HAS BEEN INITIALIZED...
\X START_OVER
\CALL SETUP
\X PAST_SETUP\ON ERROR
\MOVE 1 TO T
\IF #6<>' '\JUMP SHOWIT\ENDIF
\LOC 0,40 \HEI 199\WID 38\OVERL 0
DISPLAY THE SCREEN
OR PRESS THE SPACE BAR TO DRAW
PRESS RETURN WHEN READY TO PRINT.
\MOVE 0 TO B
\X LOOP\IF B=0\JUMP LOOP\ENDIF
\IF B=14624\CALL DRAWIT\JUMP CONT1\ENDIF
\WAIT NOW 31000
\JUMP CONT1
\X SHOWIT
\SHOW 0,0,#332
\X CONT1
\PRINT [27],'*r1A', ;start raster graphics mode
\EXECUTE >HPRASTER.EXE
\PRINT [27],'*rB', ;TURN OFF RASTER
\IF B=20224\JUMP PAGE_EJECT\ENDIF
\LOC 100,100\HEI 30\WID 19\OVE 0
Get another picture
(Y/N)?
\CURSOR 31,14
\MOVE "Y" TO #333
\QUESTION #333,1
\IF #333='N'\JUMP PAGE_EJECT\ENDIF
\LOC 100,100\HEI 30\WID 19\OVE 0
Eject the current
page(Y/N)?
\CURSOR 31,14\MOVE "N" TO #333
\QUESTION #333,1
\IF #333='N'\JUMP START_OVER\ENDIF
\CALL PAGE_OUT
\JUMP START_OVER
\X PAGE_EJECT
\CALL PAGE_OUT
\CLOSE LPT1:PRN
\END
\X SETUP
\IF #336=1\JUMP ANOTHER_PICTURE\ENDIF
\NAME #1010=RESOLUTION
\MOVE 75 TO RESOLUTION
\NAME #1020=FRAME_NMBR
\MOVE 1 TO FRAME_NMBR
\LOC 0,8\HEI 190\OVE 0\WID 40
To use this program you'll need a laser
printer with HPLASERJET emulation.
\"
This program prints a full screen in
any of 3 resolutions--75,150, and 300
dots per inch (D.P.I.).
Press End (the 1 key on the numeric
keypad) and it will stop execution after
the next line,in the middle of the page.
It calls HPRASTER.EXE to print the
screen image, but most parameters are
set directly from here.
Press 1, 2, or 3 for resolutions of
75, 150, and 300, respectively.
\X ANOTHER_RESOLUTION
\ROUNDS 800 SPEED 33
\MARQUE 45,139,128,151
\IF B=561 OR B=20224\MOVE 75 TO RESOLUTION\ELSE
\IF B=818 OR B=20480\MOVE 150 TO RESOLUTION\ELSE
\IF B=1075 OR B=20736\MOVE 300 TO RESOLUTION\ELSE
\BEEP\JUMP ANOTHER_RESOLUTION\ENDIF
\IF #336=1\JUMP SKIP1\ENDIF
\CLEAR SCREEN
\LOC 100,100\HEI 30\WID 19\OVE 0
How many copies
do you want?
\CURSOR 31,14\QUESTION #331,0
\IF #331<=0\MOVE 1 TO #331\ELSE
\IF #331>99\MOVE 99 TO #331\ENDIF
\X SKIP1
\X ANOTHER_PICTURE
\BLANK 0,0,319,87
\X READ_AGAIN
\LOC 0,88\HEI 120\OVE 0\WID 40
Enter the name of the file you want
to print.
\BLANK 0,110,320,199
\LENGTH #6
\IF A=2\ELIMINATE #6\ENDIF
\CURSOR 13,14\QUESTION #6,8
\IF #6=' '\JUMP SKIP2\ENDIF
\BUILD #6=#6,'.PIC'
\MOVE 0 TO #66
\ON ERROR CALL BAD_READ
\MOVE 0 TO A
\READ (#6)
\ON ERROR
\IF A>0 \JUMP READ_AGAIN\ENDIF
\FRAME ?\MOVE A TO #345
\JUMP FILE_READ
\X BAD_READ
\LOC 90,56\HEI 20\OVE 0\WID 30
File not found.
\RETURN
\X FILE_READ
\CLEAR SCREEN
\X ANOTHER_FRAME
\IF #345=1
\SHOW 0,0,#332
\ELSE
\BLANK 100,100,270,128
\LOC 100,100\HEI 30\WID 19\OVE 0
Which frame will
you use?
\CURSOR 30,14\QUESTION #332
\IF #332>=1\JUMP FRAME_SPEC\ENDIF
\MOVE FRAME_NMBR TO #332
\ADD 1 TO FRAME_NMBR
\X FRAME_SPEC
\IF #332>#345\MOVE #345 TO #332\ENDIF
\SHOW 0,0,#332
\BLANK 100,100,270,128
\LOC 100,100\HEI 30\WID 19\OVE 0
Is this the right
frame (Y/N/X)?
\MOVE 'Y' TO #333\CURSOR 30,14\QUESTION #333,1
\IF #345=1\IF #333<>'Y'\JUMP ANOTHER_PICTURE\ENDIF
\IF #333<>'Y' AND #333<>'X'\JUMP ANOTHER_FRAME\ENDIF
\IF #333='X'\JUMP ANOTHER_PICTURE\ENDIF
\X SKIP2
\IF #336=0
\CLEAR SCREEN
\LOC 0,0\WID 40\HEI 22\OVE 0
Move the cursor to the approximate spot
for the upper left corner of the frame.
\LINE 78,30,224,196,2,B
\LINE 80,32,222,194,2,B
\ELSE \RESTORE SCREEN\ENDIF
\MOUSE W=80,32,222,194 L=#334,#335 \+
\MOVE D TO #334\MOVE E TO #335\+
\IF RESOLUTION=150
\LINE D,E,D+33,E+20,1,B
\ELSE
\IF RESOLUTION=75
\LINE D,E,D+68,E+42,1,B
\ELSE
\LINE D,E,D+16,E+10,1,B
\ENDIF
\SAVE SCREEN\CLEAR SCREEN
\IF #336=0
\OPEN LPT1:PRN
\PRINT [27],'&l0O', ;one is landscape mode, 0 is portrait (default)
\PRINT [27],'&l',#331,'X' ;SET # OF COPIES
\PRINT [27],'*t',RESOLUTION,'R',
\MOVE 1 TO #336
\ENDIF
\PRINT [27],'&a',(#335-32)*44,'V', ;Set vert. location\+
\PRINT [27],'&a',(#334-80)*44,'H', ;SET HORI LOCATION \+
\RETURN
\X PAGE_OUT
\PRINT [27],'*rB', ;TURN OFF RASTER
\PRINT [12],
\MOVE 0 TO #336
\RETURN
\X DRAWIT
\CLEAR SCREEN
\READ HPRASTER.PIC
ENTER A NUMBER FOR A COLOR (1234)
\QUEST Q\IF Q<1\MOVE 1 TO Q\ELSE\IF Q>4\MOVE 4 TO Q \ENDIF
\CLEAR SCREEN
\MOUSE F=3,Q X=N W=0,0,319,200 R=-1
\RETURN
\END OF FILE