home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d09xx
/
d0925.lha
/
DonsGenies
/
FrenchGenies.lha
/
Rexx
/
GuidesTirésDeLaBoîte.pprx
< prev
next >
Wrap
Text File
|
1993-08-03
|
2KB
|
92 lines
/*
@BGuidesTirΘsDeLaBoεte @P @I Ecrit et ⌐ par Don Cox en FΘvrier 1993
@IN'est pas du Domaine Publique. Tous Droits RΘservΘs.
Traduit par Fabien Larini le 30/07/93.
Ce GΘnie utilise la position d'une boεte pour positionner la grille, en
activant l'alignement sur grille. Le rΘsulat ressemble α des guides
verticaux ou horizontaux passant par la boεte. Les boεtes ayant un angle
de rotation ne sont pas positionnΘes correctement. Il sauve les anciennes
dimensions afin de pouvoir les rΘutiliser grΓce au GΘnie "RestoreGrille"
*/
/*GrifPositionFromBox*/
/* This Genie sets up a grid to match the position of a box, with snap
enabled. If either a side or the top is selected, the result resembles a
snap-to guide line. Note that when you move a box only the left or top side
will snap, and rotated boxes do not snap properly. Ctrl-S switches snap on
and off.
Written by Don Cox ⌐ Feb 93. Not public domain. All rights reserved. */
signal on error
signal on syntax
address command
call SafeEndEdit.rexx()
call ppm_AutoUpdate(0)
cr="0a"x
trace n
currentunits = ppm_GetUnits()
box = ppm_ClickOnBox("Clickez dans la Boεte pour les Dimensions.")
if box = 0 then exit_msg("Pas de Boεte SΘlectionnΘe")
gsize = ppm_GetGridSize()
gwidth = word(gsize,1)
gheight = word(gsize,2)
call ppm_SaveText("ram:gridsize",gsize)
size = ppm_GetBoxSize(box)
width = word(size,1)
height = word(size,2)
where = ppm_GetBoxPosition(box)
xpos = word(where,1)
ypos = word(where,2)
if xpos>2 then do
xnum = xpos%2.0
xspacing = xpos/xnum
end
if ypos>2 then do
ynum = ypos%2.0
yspacing = ypos/ynum
end
choice = ppm_Inform(3,"Choix du Bord de la Boεte pour la mise en place de la Grille","Droit","SupΘrieur","Gauche")
select
when choice = 0 then do
if (xpos+width)>2 then do
xnum = (xpos+width)%2
xspacing = (xpos+width)/xnum
end
call ppm_SetGridSize(xspacing,0.01)
end
when choice = 1 then call ppm_SetGridSize(0.01,yspacing)
otherwise call ppm_SetGridSize(xspacing,0.01)
end
call ppm_SetGrid(1)
call ppm_SetGridSnap(1)
call exit_msg()
end
error:
syntax:
do
exit_msg("ArrΩt du GΘnie d√ α l'erreur: "errortext(rc))
end
exit_msg:
do
parse arg message
if message ~= "" then
call ppm_Inform(1,message,)
call ppm_ClearStatus()
call ppm_AutoUpdate(1)
exit
end