home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 58
/
af058b.adf
/
PV21.lha
/
REXX
/
TouchLineWeights.pvrx
< prev
next >
Wrap
Text File
|
1991-07-22
|
2KB
|
69 lines
/* TouchLineWeights.pvrx---bumps all lineweights below minimum to
quarter point to prevent lines dropping out at
1200-2400 DPI. Changes objs with same FillVal and
EdgeVal to No line.
Copyright © 1991 Stylus, Inc.
Author: Jeff Blume
*/
/* Try to get exclusive lock on project window.
If can't get lock, not safe to proceed. */
'Lock'
if rc ~= 0 then exit
options results
/* Prompt user for minimum line weight */
'GetStr "Min. line weight in inches; OK=.25pt" "OK" "CANCEL"'
LWmin = result
if rc ~= 0 then call CleanUp
if LWmin = "" then LWmin = .00346 /* default to .25pt */
'Prompt "Working..."'
'PushUndo'
/* Walk layer list to get all objects; SelExtent of page
would not include object partially off page... */
'GetLayers' LayList; LayNum = result
do i = 0 to LayNum-1 /* Loop on Layer List */
'FirstObj' LayList.i; Obj.0 = result
call TestLW Obj.0
do j = 1 until rc ~= 0 /* rc~=0 proper test for end of list? */
k = j - 1
'NextObj' Obj.k; Obj.j = result
call TestLW Obj.j
end
end
'EndPrompt'
CLEANUP:
/* Render the area operated upon, and free the project window
This sequence is recommended to finish up most macros */
'Repair'
'UnLock'
exit
TESTLW:
arg TestObj
/* Get relevant attributes */
'EdgeWidth' TestObj; ObjEdgeWidth = Result
'EdgeVal' TestObj; ObjEdgeVal = Result
'FillType' TestObj; ObjFillType Result
'FillVal' TestObj; ObjFillVal = Result
if ObjEdgeWidth<LWmin & ObjFillType=1 & ObjFillVal=ObjEdgeVal then
do
'SaveUndo' TestObj
'ChangeEdgeType' TestObj 0
end
else if ObjEdgeWidth < LWmin then
do
'SaveUndo' TestObj
'ChangeEdgeWidth' TestObj LWmin
end
/* Made smarter to test for filled objects with same
border color and sets to NOLINE). Presumes line weight less
than the minimum is insignificant. */