Herve Proudhon magnificenly supplied:
>If you have a circle (graphic) named "cercle_mycircle" and a field
>named "T_mycircle"
>place_val_dans_cercle "mycircle"
>on place_val_dans_cercle quoi
> put "cercle_" & quoi into nom_cercle
> put (the width of cd graphic nom_cercle)/2 into rayon
> put the startangle of cd graphic nom_cercle into debut
> put the arcangle of cd graphic nom_cercle into taille
> put taille/2 into teta
> put debut + (teta) into fi
> put (fi*pi)/180 into fi_radian
> put (teta*pi)/180 into teta_radian
> put (rayon*cos(fi_radian))/(1+sin(teta_radian)) into x
> put (rayon*sin(fi_radian))/(1+sin(teta_radian)) into y
> put the loc of cd graphic nom_cercle into coo
> put item 1 of coo + x into item 1 of coo
> put item 2 of coo - y into item 2 of coo
> put "T_" & quoi & "_val" into champ
> set the loc of cd field champ to coo
>end place_val_dans_cercle
Many thanks, Herve! I had to adjust it a bit...
set the loc of fld "myFld" to coords(the id of grc "myGrc")
function coords grcID
put (the width of grc id grcID)/2 into R
put the startangle of grc id grcID into tStartAngle
put the arcangle of grc id grcID into tAngleSize
put tAngleSize/2 into teta
put tStartAngle + (teta) into fi
put (fi*pi)/180 into fi_radian
put (teta*pi)/180 into teta_radian
put (R*cos(fi_radian))/(1+sin(teta_radian)) into x
put (R*sin(fi_radian))/(1+sin(teta_radian)) into y
put the loc of grc id grcID into coo
put item 1 of coo + x into item 1 of coo
put item 2 of coo - y into item 2 of coo
return coo
end coords
atb
/H
Hugh Senior
The Flexible Learning Company
Consultant Programming & Software Solutions
Fax/Voice: +44 (0)1483.27 87 27
Email: [EMAIL PROTECTED]
Web: www.flexibleLearning.com
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm