]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-banier.mf
release: 0.1.23
[lilypond.git] / mf / feta-banier.mf
1 % flags 
2 %
3
4
5 fet_begingroup("floogbars")
6
7 save flag_angle, flare;
8 save hip_thickness, hip_depth, hip_width;
9 save foot_thickness, foot_depth, foot_width;
10
11 flag_angle = 32;
12
13 hip_thickness# = 1.2 stafflinethickness#;
14 foot_thickness# = blot_diameter#;
15 flare# = 1.0 interline#;
16
17 hip_depth# = 15/7 interline#; 
18 hip_width# = 7/8 interline# + hip_thickness# /2 + stemthickness#/2;
19
20 foot_depth# = flare# + 15/7 interline#;
21 foot_width# = .8 hip_width#;
22
23
24 define_pixels(flare, 
25         hip_depth, hip_width, hip_thickness,
26         foot_depth, foot_width, foot_thickness
27 );
28
29 %treq;
30
31
32 %
33 % Inspired by Adobe Sonata,
34 % for example, see POSTSCRIPT Language -- program design, 
35 % page 119
36 %
37 def draw_eight_flag =
38         penpos0(stemthickness, 0);
39         penpos1(flare, 90);
40         penpos2(hip_thickness, 0);
41         penpos3(foot_thickness, 0) ;
42         penpos4(stemthickness, 0);
43
44         z0r = z1r;
45         z0  = (0,0);
46         z2 = (hip_width, -hip_depth);
47         z3 = (foot_width, -foot_depth);
48         z4r = z1l;
49
50         save bot_dir, bot_path;
51         pair bot_dir;
52         path bot_path;
53         bot_path := z2{down} .. z3;
54         bot_dir := direction 1 of bot_path;
55
56         fill z1l{dir -flag_angle} .. z2l{down} .. 
57                 z3l{bot_dir}  .. z3r{-bot_dir} ..
58                 {up}z2r .. {up}z1r .. 
59                 z0l{down} -- z4l -- cycle;
60                 
61                 ;
62
63 enddef;
64
65
66 fet_beginchar("8th Flag (up)", "3u", "eighthflag")
67         set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2, 
68                 foot_depth# + foot_thickness#/2, stemthickness#/2)
69
70         draw_eight_flag;        
71         penlabels(0, 1, 2, 3, 4);
72 fet_endchar;
73
74 fet_beginchar("8th Flag (down)", "3d", "deighthflag")
75         set_char_box(stemthickness# /2, hip_width# + hip_thickness#/2, 
76                 foot_depth# + foot_thickness#/2, stemthickness#/2)
77
78         draw_eight_flag;
79         y_mirror_char;
80 fet_endchar;
81
82 fet_endgroup("floogbars")