1 %% === Pseudo-transparence =====================================================
2 %% Code emprunté à Anthony Phan :
3 %% http://www-math.univ-poitiers.fr/~phan/metalpha.html
9 def gdd_AlphaFill expr c =
10 gdd_ap := nullpicture;
11 gdd_AlphaPicture(currentpicture,c);
12 addto currentpicture also gdd_ap;
15 vardef gdd_AlphaPicture(expr p,c) =
18 addto p_ contour c withcolor gdd_ta[background,gdd_tc];
20 if (not clipped p__) and (not bounded p__):
21 addto p_ also p__ withcolor
22 gdd_ta[(redpart p__,greenpart p__,bluepart p__), gdd_tc];
24 begingroup save gdd_ap;
25 picture gdd_ap; gdd_ap = nullpicture;
26 gdd_AlphaPicture(p__,pathpart p__);
35 vardef ColorieAvecTransparence(expr p,c,a) =
36 gdd_tc := c; gdd_ta := a;
38 gdd_AlphaFill (p gddEnPlace)
40 gdd_AlphaFill ((gddTraceObjet p) gddEnPlace)