home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 82 / af082sub.adf / FINALWRITER / FINAL.lzx / FinalWriter / FinalMacros / Macros / Shadow.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1978-01-01  |  1.9 KB  |  70 lines

  1. /* Shadow 1.0 (27.11.94) by NDY's  */
  2.  
  3. /* The following variables can be altered:  */
  4. xpos=.4    /* Horizontal displacement (relative to the textblock's height) */
  5. ypos=.4    /* Vertical displacement (relative to the textblock's height) */
  6. zoom=-.1   /* Zoom factor (relative to the textblock's height/width) */
  7. steps=15   /* # of objects to be created (increase this if you use large "pos" values
  8.               or large objects) */
  9.  
  10. /* Now let's create the shadow! */
  11. OPTIONS RESULTS
  12. FirstObject "SELECTED"
  13. txt=0
  14. o=RESULT
  15. IF o~=0 THEN
  16.   DO
  17.     cnt=0
  18.     DO UNTIL o=0
  19.       obj.cnt=o
  20.       NextObject o "SELECTED"
  21.       o=RESULT
  22.       cnt=cnt+1
  23.     END
  24.     DO i=0 TO cnt-1 WHILE txt=0
  25.       GetObjectType obj.i
  26.       IF RESULT=7 THEN txt=obj.i
  27.     END
  28.   END
  29. IF txt~=0 THEN
  30.   DO
  31.     GetDocItemPrefs "DECIMAL"
  32.     deci=RESULT
  33.     DocItemPrefs "DECIMAL PERIOD"
  34.     Status "FONTCOLOR"
  35.     tcol=RESULT
  36.     GetObjectTypeSpecs txt "SIZE LEADING WIDTH OBLIQUE POSITION CASE STYLE FONT"
  37.     PARSE VAR RESULT tsize tlead twid tobl tpos tcase tstyl tfont
  38.     TextBlockTypePrefs "SIZE" tsize "LEADING" tlead "WIDTH" twid "OBLIQUE" tobl "POSITION" tpos "CASE" tcase "STYLE" tstyl "COLOR" tcol
  39.     IF Left(tfont,1)~=" " THEN tfont=" "||tfont
  40.     TextBlockTypePrefs "FONT"||tfont
  41.     GetObjectCoords txt
  42.     PARSE VAR RESULT page x y w h
  43.     GetObjectRotation txt
  44.     rot=RESULT
  45.     GetTextBlockText txt
  46.     text=RESULT
  47.     xstp=h*xpos/steps
  48.     ystp=h*ypos/steps
  49.     wstp=w*zoom/steps
  50.     hstp=h*zoom/steps
  51.     DO i=1 TO steps
  52.       x=x+xstp
  53.       y=y+ystp
  54.       w=w+wstp
  55.       h=h+hstp
  56.       DrawTextBlock page x y text
  57.       obj.i=RESULT
  58.       SetObjectRotation obj.i rot
  59.       IF dw~=0 | dh~=0 THEN SetObjectCoords obj.i page x y w h
  60.     END
  61.     ObjectToFront txt
  62.     SelectObject
  63.     DO i=1 TO steps
  64.       SelectObject obj.i "MULTIPLE"
  65.     END
  66.     SelectObject txt "MULTIPLE"
  67.     Group
  68.     DocItemPrefs "DECIMAL" deci
  69.   END
  70.