home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
f
/
finalwriter
/
finalwriterv5.03a.dms
/
finalwriterv5.03a.adf
/
FWMacros.lha
/
GfxShadowBox
< prev
next >
Wrap
Text File
|
1994-10-03
|
3KB
|
101 lines
/* ==================================================== */
/* Final Writer Arexx Macro - SHADOW BOX */
/* This macro will draw a black shadow box for the */
/* current selected objects, (except lines,arrows,arcs, */
/* shapes and group objects). */
/* by Terry Wright */
/* $VER: GfxShadowBox 3.1 (3.10.94) */
/* © 1994 SoftWood, Inc. */
/* Use of this macro is strictly at the user's risk. */
/* ==================================================== */
Options Results
/* ------------------------------------ */
/* Set parameters to be in ruler units. */
/* ------------------------------------ */
SetMeasure MICROPOINTS
/* ------------------------------------------- */
/* These are the offsets for the shadow box */
/* in micropoints. (720 micropoints = 1 inch) */
/* ------------------------------------------- */
XOffset = 45
YOffset = 45
/* ------------------------------------------- */
/* Get the id of the first selected object. */
/* If there are no objects selected then quit. */
/* ------------------------------------------- */
FirstObject SELECTED
IF ( Result = 0 ) THEN
EXIT
/* ------------------------------------------- */
/* Collect the ids of all the selected objects */
/* ------------------------------------------- */
i = 0
DO WHILE Result ~= 0
i = i + 1
ObjId.i = Result
NextObject ObjId.i SELECTED
END
/* ---------------------------------------- */
/* Loop through all of our objects creating */
/* a shadow box for each one. */
/* ---------------------------------------- */
x = 0
DO WHILE (x < i)
x = x + 1
/* ----------------------------------------- */
/* Find out the type of the object. We don't */
/* want to draw a shadow for lines, arrows */
/* arcs, shapes, or groups. */
/* ----------------------------------------- */
GetObjectType ObjId.x
objtype = Result
IF (objtype ~= 2 & objtype ~= 3 & objtype ~= 8 & objtype ~= 9 & objtype ~= 10) THEN DO
/* ---------------------------------- */
/* Get the coordinates and parameters */
/* ---------------------------------- */
GetObjectCoords ObjId.x
coords = Result
PARSE VAR coords page left top width height
GetObjectParams ObjId.x TEXTFLOW FLOWDIST
params = Result
PARSE VAR params tflow fdist
bevel = ""
IF ( objtype = 5 ) THEN
bevel = "BEVEL"
/* ----------------------------- */
/* Draw the shadow by offsetting */
/* the left and top values. */
/* ----------------------------- */
left = left + XOffset
top = top + YOffset
IF ( objtype = 6 ) THEN
DrawOval page left top width height
ELSE
DrawBox page left top width height bevel
shadowId = Result
/* -------------------------------------------------- */
/* Now Set the object parameters keeping the textflow */
/* flow distance the same as the original object. Set */
/* fill to solid, lineweight to none and the colors */
/* to black. Then send the new object to the back. */
/* -------------------------------------------------- */
SetObjectParams shadowId TEXTFLOW tflow FLOWDIST fdist LINEWT "None" LINECOLOR "Black" FILL "Solid" FILLCOLOR "Black"
ObjectToBack shadowId
END
END
SelectObject 0
Redraw