home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 58
/
af058b.adf
/
PV21.lha
/
REXX
/
Tile_PREFS.pvrx
< prev
next >
Wrap
Text File
|
1991-10-08
|
2KB
|
67 lines
/* Tile_PREFS.pvrx---prompts for number of tiles in X and Y
directions; sets the views to each tile and partial
plots it.
Suggested "ProVector.pvrx" entry:
'Define "Tile_PREFS " Tile_PREFS'
Copyright © 1991 by Stylus, Inc.
Author: Jeff Blume
*/
options results
/* Obtain exclusive access to ProVector(tm); quit if not possible */
'Lock'
if rc ~= 0 then exit
'GetStr "Enter # of XTiles, YTiles:" "OK" "Cancel"'
XYTiles = result
if rc ~= 0 | words(XYTiles) ~= 2 then call Error "Didn't give TWO numbers/Canceled"
XTiles = subword(XYTiles,1,1) /* extract the 2 numbers */
YTiles = subword(XYTiles,2,1)
NumTiles = XTiles * YTiles
CurrPage = 0
'GetBool "Pause after each page?" "Yes" "No"'
if RC = 0 then Pause = "True"
'GetPageSize' PSize /* PSize.X1, PSize.Y1, PSize.X2, PSize.Y2 */
TileW = abs(PSize.X1-PSize.X2)/XTiles
TileH = abs(PSize.Y1-PSize.Y2)/YTiles
/* Set initial view (tile) height */
View.Y1 = PSize.Y1
View.Y2 = PSize.Y1 + TileH
/* Tile in X axis first, to feed continuous tiles */
do i = 1 for YTiles
/* Set initial view (tile) width */
View.X1 = PSize.X1
View.X2 = PSize.X1 + TileW
do j = 1 for XTiles
'SetView' View
'PartialPlot "PV_Drivers/Preferences Advance=True AskUser=False"'
CurrPage = CurrPage + 1
if Pause = "True" & CurrPage ~= NumTiles then do
'Getbool "Continue or Quit?" "OK" "QUIT"'
if RC ~= 0 then call CleanUp
end
View.X1 = View.X2
View.X2 = View.X2 + TileW
end /* end X do */
View.Y1 = View.Y2
View.Y2 = View.Y2 + TileH
end /* end Y do */
CleanUp:
'SetView' PSize /* Zoom out to Full View */
'UnLock' /* Always be sure to unlock ProVector */
exit
Error:
arg String
'GetBool String "Cancel" "Cancel"'
'UnLock'
exit