- define_pixels(ht, wd);
- pickup pencircle
- xscaled stafflinethickness
- yscaled 0.4ht
- rotated (-35*direction);
- z1=(0.0wd,-direction*0.2ht);
- z2=(0.2wd,+direction*0.2ht);
- z3=(0.4wd,-direction*0.2ht);
- z4=(0.6wd,+direction*0.2ht);
- z5=(0.8wd,-direction*0.2ht);
- z6-z5=(stem_size*0.5wd,+direction*stem_size*ht);
- draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
+ lft x1 = 0.0 wd;
+ lft x2 = 0.2 wd;
+ lft x3 = 0.4 wd;
+ lft x4 = 0.6 wd;
+ lft x5 = 0.8 wd;
+
+ y6 - y5 = direction * stem_ht;
+ y6 - y5 = (x6 - x5) * tand (90 - dalpha);
+
+ if direction > 0:
+ fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
+ -- get_subpoint (ellipse, z2 - z1, z2)
+ -- get_subpoint (ellipse, z3 - z2, z2)
+ -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
+ -- get_subpoint (ellipse, z4 - z3, z4)
+ -- get_subpoint (ellipse, z5 - z4, z4)
+ -- get_subpath (ellipse, z5 - z4, z6 - z5, z5)
+ -- get_subpath (ellipse, z6 - z5, z5 - z6, z6)
+ -- get_subpoint (ellipse, z5 - z6, z5)
+ -- get_subpoint (ellipse, z4 - z5, z5)
+ -- get_subpath (ellipse, z4 - z5, z3 - z4, z4)
+ -- get_subpoint (ellipse, z3 - z4, z3)
+ -- get_subpoint (ellipse, z2 - z3, z3)
+ -- get_subpath (ellipse, z2 - z3, z1 - z2, z2)
+ -- cycle;
+ else:
+ fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
+ -- get_subpath (ellipse, z2 -z1, z3 - z2, z2)
+ -- get_subpoint (ellipse, z3 - z2, z3)
+ -- get_subpoint (ellipse, z4 - z3, z3)
+ -- get_subpath (ellipse, z4 -z3, z5 - z4, z4)
+ -- get_subpoint (ellipse, z5 - z4, z5)
+ -- get_subpoint (ellipse, z6 - z5, z5)
+ -- get_subpath (ellipse, z6 - z5, z5 - z6, z6)
+ -- get_subpath (ellipse, z5 - z6, z4 - z5, z5)
+ -- get_subpoint (ellipse, z4 - z5, z4)
+ -- get_subpoint (ellipse, z3 - z4, z4)
+ -- get_subpath (ellipse, z3 - z4, z2 - z3, z3)
+ -- get_subpoint (ellipse, z2 - z3, z2)
+ -- get_subpoint (ellipse, z1 - z2, z2)
+ -- cycle;
+ fi;