home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / propage4.0 / arexx / boxesquickrunaround.pprx < prev    next >
Encoding:
Text File  |  1993-01-01  |  1.7 KB  |  64 lines

  1. /*
  2. Boxes Quick Runaround. This is for doing runarounds on bitmaps. Draw around the relevant area of your bitmap using the polygon tool (not the freehand tool). Double-click to finish. This genie will then set up the polygon box quickly to give a standard irregular runaround; you can process several boxes at once.
  3. ©Don Cox Dec 92. Freely usable for non-commercial purposes, but not Public Domain.
  4. */
  5. trace r
  6. address command
  7. call SafeEndEdit.rexx()
  8. call ppm_AutoUpdate(0)
  9. currentunits = ppm_GetUnits()
  10. call ppm_SetUnits(2)
  11. currentline = ppm_GetLineWeight()
  12. currentfill = ppm_GetFillPattern()
  13.  
  14.  
  15. counter = 0
  16. do forever
  17.     box=ppm_ClickOnBox("  Click on polygon boxes for runarounds...")
  18.     if box=0 then break
  19.     counter=counter+1
  20.     boxes.counter=box
  21.     call ppm_SelectBox(box)
  22.     end
  23.  
  24. if counter = 0 then exit_msg("No boxes selected")
  25.  
  26.  
  27. do i = 1 to counter
  28.     box = boxes.i
  29.     info = ppm_GetBoxInfo(box)
  30.     boxtype = word(info,1)
  31.     if upper(boxtype) ~= "STRUCTURED" then iterate
  32.     
  33. /* Framedata setting not working Dec 92 */
  34.     framedata = ppm_GetBoxFrameData(box)
  35.     parse var framedata linecolor "0a"x fillcolor "0a"x lw "0a"x linepattern "0a"x fp
  36.     call ppm_SetBoxFrameData(box,linecolor,"Red","0.00",linepattern,0)
  37.     call ppm_SetBoxStandoff(box,0.4)
  38.     call ppm_SetBoxTextWrap(box,2,0)
  39.     call ppm_SetBoxTransparent(box,1)
  40.     end
  41.  
  42. call ppm_SetUnits(currentunits)
  43. call ppm_SetLineWeight(currentline)
  44. call ppm_SetFillPattern(currentfill)
  45. call ppm_SetWireFrame(0)
  46. call exit_msg
  47. end
  48.  
  49. error:
  50. syntax:
  51.     do
  52.     exit_msg("Genie failed due to error: "errortext(rc))
  53.     end
  54.  
  55. exit_msg:
  56.     do
  57.     parse arg message
  58.     if message ~= "" then
  59.     call ppm_Inform(1,message,"Resume")
  60.     call ppm_ClearStatus()
  61.     call ppm_AutoUpdate(1)
  62.     exit
  63.     end
  64.