/*@BBordureObjetsComplexes @P@I Ecrit et ⌐ par Don Cox en juillet 92
@IN'est pas du Domaine Publique. Tous Droits RΘservΘs.
Traduit par Fabien Larini le 17/07/93.
Ce GΘnie encadre les boεtes avec un dessin dans chaque coin et un motif
composΘ de plusieurs dessins. Il a besoin d'une boεte contenant le dessin
(clip ou bitmap) pour les coins, de une ou plusieur boεtes similaires pour
le motif des c⌠tΘs. La bordure rΘalisΘe, est groupΘe avec la boεte α
encadrer, pour dΘplacer l'ensemble, appuyer sur Shift.
*/
/*BordersRepeats*/
/* This Genie puts a decorative border around a box. You will need a box containing a clip or bitmap for the corners, and one or more similar boxes for the sides. The resulting border consists of a group of individual boxes, which can be moved together if you hold down the shift key.
Written by Don Cox July '92. Not Public Domain. All rights reserved. */
trace n
address command
signal on error
signal on syntax
signal on halt
signal on break_c
signal on break_d
signal on break_e
rad = 3.1415926 / 180
call ppm_AutoUpdate(0)
call SafeEndEdit.rexx()
cr="0a"x
if ~show('l', "gdarexxsupport.library") then
if ~addlib("gdarexxsupport.library",0,-30) then
call exit_msg("Installez la gdarexxsupport.library dans le rΘpertoire libs: avant de lancer ce GΘnie")
CurrentUnits = ppm_GetUnits()
select
when CurrentUnits = 1 then units="inches"
when CurrentUnits = 2 then units="millimetres"
otherwise units ="points"
end
mainbox = ppm_ClickOnBox("Clickez sur la Boεte α Encadrer")
if mainbox=0 then exit_msg("Pas de Boεte SelectionnΘe")
mainpos = ppm_GetBoxPosition(mainbox)
mainXpos = word(mainpos, 1)
mainYpos = word(mainpos, 2)
mainsize = ppm_GetBoxSize(mainbox)
mainangle = ppm_GetBoxAngle(mainbox)
breadthRaw = ppm_GetUserText(6, "Largeur du cadre en "units)
if breadthRaw="" then exit_msg("Abandon Utilisateur")
if CurrentUnits = 2 then breadth = breadthRaw/10 /* mm to cm */
if CurrentUnits = 3 then breadth = breadthRaw/12 /* points to picas */
mainheight = (word(mainsize, 2))-(breadth*2)
mainwidth = (word(mainsize, 1))-(breadth*2)
if mainheight<0 | mainwidth<0 then exit_msg("Largeur Impossible : "breadthRaw)
cornerbox = ppm_ClickOnBox("Clickez dans la Boεte contenant le Dessin des Coins")
if cornerbox ~=0 then do
csize = ppm_GetBoxSize(cornerbox)
cXsize = word(csize, 1)
cYsize = word(csize, 2)
cscale = ppm_GetBoxScale(cornerbox)
cscaleX = word(cscale, 1)
cscaleY = word(cscale, 2)
cangle = ppm_GetBoxAngle(cornerbox)
end
counter=0
do forever
box=ppm_ClickOnBox("Clickez dans les Boεtes contenant le(s) Dessin(s) pour le Motif des CotΘs")
if box=0 then break
counter=counter+1
boxes.counter=box
call ppm_SetBoxAngle(box,0)
if counter = 5 then break
end
if counter = 0 & cornerbox = 0 then exit_msg("Pas de Dessins pour les Coins et les Bords")
sideboxes = counter /* This is the number of different units in the design */
do while counter<6
counter = counter+1
boxes.counter = boxes.1 /* pad up to 5 */
end
if Sideboxes>1 then do
pattern = ppm_GetUserText(Sideboxes*3, Sideboxes" boεtes selectionnΘes. Tapez un motif de rΘpΘtition en utilisant abBAc etc.")