home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / f / finalwriter / finalwriterv5.03h.dms / finalwriterv5.03h.adf / FWMacros.lha / GfxLineWt_Decr < prev    next >
Text File  |  1993-10-25  |  2KB  |  67 lines

  1. /* ===================================================== */
  2. /* Makes currently selected objects' lineweight thinner. */
  3. /* FinalWriter macro written by Ric Fischer - 7/9/93     */
  4. /* $VER: GfxLineWt_Decr 3.0 (21.7.93)                    */
  5. /* ===================================================== */
  6.  
  7. Options Results
  8.  
  9. I = 0
  10. X = 0
  11.  
  12. /* --------------------------------------- */
  13. /* Get the id of the first selected object */
  14. /* --------------------------------------- */
  15. FirstObject SELECTED
  16.  
  17. /* ----------------------------------------- */
  18. /* If there are no selected object then quit */
  19. /* ----------------------------------------- */
  20. IF ( Result = 0 ) THEN
  21.    EXIT
  22.  
  23. /* ----------------------------------------------- */
  24. /* Collect all the ids of all the selected objects */
  25. /* ----------------------------------------------- */
  26. DO WHILE RESULT~=0
  27.    I = I + 1
  28.    Objects.I = Result
  29.    NextObject Objects.I SELECTED
  30.    END
  31.  
  32. /* --------------------------------------------- */
  33. /* For each object we have determine its current */
  34. /* line weight and and then set it to the next   */
  35. /* thinner line weight.                          */
  36. /* --------------------------------------------- */
  37. DO WHILE X < I
  38.    X = X + 1
  39.    GetObjectParams Objects.X LINEWT
  40.    SELECT
  41.       WHEN Result='12' THEN SetObjectParams Objects.X LINEWT '10'
  42.       WHEN Result='10' THEN SetObjectParams Objects.X LINEWT '8'
  43.       WHEN Result='8' THEN SetObjectParams Objects.X LINEWT '6'
  44.       WHEN Result='6' THEN SetObjectParams Objects.X LINEWT '4'
  45.       WHEN Result='4' THEN SetObjectParams Objects.X LINEWT '2'
  46.       WHEN Result='2' THEN SetObjectParams Objects.X LINEWT '1'
  47.       WHEN Result='1' THEN SetObjectParams Objects.X LINEWT '.5'
  48.       WHEN Result='.5' THEN SetObjectParams Objects.X LINEWT 'Hairline'
  49.       WHEN UPPER(Result)='HAIRLINE' THEN SetObjectParams Objects.X LINEWT 'None'
  50.       OTHERWISE ITERATE
  51.    END
  52. END
  53.  
  54. /* ----------------------------------------- */
  55. /* Now redraw the screen to show the changes */
  56. /* ----------------------------------------- */
  57. Redraw
  58.  
  59. /* ------------------------ */
  60. /* Reselect all the objects */
  61. /* ------------------------ */
  62. X = 0
  63. DO WHILE X < I
  64.    X = X + 1
  65.    SelectObject Objects.X MULTIPLE
  66.    END
  67.