home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d925 / donsgenies.lha / DonsGenies / FrenchGenies.lha / Rexx / PageLandscape.pprx < prev    next >
Text File  |  1993-08-03  |  2KB  |  69 lines

  1. /*
  2. @BPageLandscape @P @I Ecrit et © par Don Cox en juillet 1992
  3. @IN'est pas du Domaine Publique. Tous Droits Réservés.
  4. Traduit par Fabien Larini le 30/07/93.
  5.     
  6. Ce Génie transforme la page courante du format portrait au format 
  7. landscape (à l'italienne) et vice versa. Il règle les spécifications 
  8. PostScript en conséquence.
  9. */
  10.     
  11.  
  12. /*LandscapePage*/
  13. /* This Genie changes a portrait format page to landscape, and vice versa. It sets up the Postscript output specs correctly.
  14. Written by Don Cox  July '92 Not Public Domain. All rights reserved.   */
  15.  
  16.  
  17.  
  18. signal on error
  19. signal on syntax
  20. address command
  21. call SafeEndEdit.rexx()
  22.  
  23. cpage = ppm_CurrentPage()
  24. psize = ppm_GetPageSize(cpage)
  25. Xsize = word(psize,1)
  26. Ysize = word(psize,2)
  27.  
  28. if Xsize = Ysize then exit_msg("La Page est Carrée")
  29. if Xsize<Ysize then 
  30. do
  31.     shape = "Portrait"
  32.     newshape = "Landscape"
  33.     neworient = 2
  34.     end
  35. else do
  36.     shape = "Landscape"
  37.     newshape = "Portrait"
  38.     neworient = 1
  39.     end
  40.  
  41. choiceint = ppm_Inform(2,"La Page est "shape". Convertit en "newshape"?","Oui","Non")
  42. if choiceint  ~=0 then exit_msg("Pas de Changement")
  43.  
  44. call ppm_SetPageSize(cpage,Ysize,Xsize)
  45. orient = ppm_GetPSOutputOrient(cpage)
  46.  
  47. call ppm_SetPSOutputOrient(cpage,neworient)
  48.  
  49. call exit_msg()
  50.  
  51. end
  52.  
  53. error:
  54. syntax:
  55.     do
  56.     exit_msg("Arrêt du Génie dû à l'erreur: "errortext(rc))   
  57.     end
  58.  
  59. exit_msg:
  60.     do
  61.     parse arg message
  62.     if message ~= "" then
  63.     call ppm_Inform(1,message,)
  64.     call ppm_ClearStatus()
  65.     call ppm_AutoUpdate(1)
  66.     exit
  67.     end
  68.  
  69.