From e7394ca9021a684297e60280bde0c43828b4fad3 Mon Sep 17 00:00:00 2001 From: Maxime Chupin Date: Sat, 24 Sep 2011 11:38:48 +0200 Subject: [PATCH] =?utf8?q?Ajout=20d'une=20fonction=20EtiquetteChemin=20dan?= =?utf8?q?s=20gdd-lbl=20permettant=20l'=C3=A9tiquettage=20des=20chemins=20?= =?utf8?q?et=20des=20courbes?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- gdd-lbl.mp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gdd-lbl.mp b/gdd-lbl.mp index f9b4a74..6ed8490 100644 --- a/gdd-lbl.mp +++ b/gdd-lbl.mp @@ -62,7 +62,22 @@ enddef; vardef Etiquette.@#(expr s,t,p) = label.@#(TEX(s) scaled t,p gddEnPlace) enddef; +vardef EtiquetteChemin.@#(expr s,p,pos) = % label, chemin, position + save chemin; + path chemin; + if path p: + chemin:=p; + else: + chemin:=gddP[p]; % fonction pour chemin et courbe + fi; + label.@#(TEX(s), _milieuChemin(chemin,pos) gddEnPlace) +enddef; +vardef _milieuChemin(expr p,pos) = % là, p est du type path + save midtime; + midtime = arctime (pos*(arclength(p))) of p; + point infinity of (subpath (0,midtime) of p) +enddef; vardef FICHIER primary s = save _s; string _s; _s = "input " & s; -- 2.20.1