home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 58
/
af058b.adf
/
PV21.lha
/
REXX
/
Mirror.pvrx
< prev
next >
Wrap
Text File
|
1991-06-06
|
1KB
|
64 lines
/* Mirror.pvrx---This macro will flip the selected objects along the axis
specified by the user, 'X,' 'Y,' and 'XY.'
Copyright © 1989 by Taliesin, Inc.
Author: Jeff Blume & Ross Cunniff
Usage: Assign to Ctrl-Key or RX tool
The macro expects to find at least one selected object. */
options results
/* Try to get exclusive lock on project window.
If can't get lock, not polite to interrupt. */
'Lock'
if rc ~= 0 then exit
'GetStr "Axis (X Y or XY)?" "OK" "Cancel"'
Axis = Result
if RC ~= 0 | Axis = "" then call CLEANUP
'SelectList' Sel; SelN = Result
if SelN = 0 then call ERROR "No selected objects!"
'PushUnDo'
/* Determine requested axis */
select
when upper(Axis) = "X" then call XFLIP
when upper(Axis) = "Y" then call YFLIP
when upper(Axis) = "XY" then call XYFLIP
otherwise call Error 'X Y or XY !'
end
XFLIP:
do i = 0 to SelN-1
'ObjExtent' Sel.i Ext
'Size' Sel.i Ext.X1 Ext.Y1 "-1" "1"
end
call CLEANUP
YFLIP:
do i = 0 to SelN-1
'ObjExtent' Sel.i Ext
'Size' Sel.i Ext.X1 Ext.Y1 "1" "-1"
end
call CLEANUP
XYFLIP:
do i = 0 to SelN-1
'ObjExtent' Sel.i Ext
'Size' Sel.i Ext.X1 Ext.Y1 "-1" "-1"
end
CLEANUP:
'Repair'
ERROR:
arg ErrTxt
if RC ~= 0 | ErrTxt ~= "" then do
'GetBool ErrTxt "Cancel" "Cancel"'
end
'UnLock'
exit