Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(583)

Delta Between Two Patch Sets: lily/stem.cc

Issue 4661061: Adds glissando stems to Lilypond.
Left Patch Set: Fixes issue with beam slopes. Created 13 years, 8 months ago
Right Patch Set: Merge with new stem code. Created 13 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lily/simple-spacer.cc ('k') | lily/stem-engraver.cc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
5 Jan Nieuwenhuizen <janneke@gnu.org> 5 Jan Nieuwenhuizen <janneke@gnu.org>
6 6
7 TODO: This is way too hairy 7 TODO: This is way too hairy
8 8
9 TODO: fix naming. 9 TODO: fix naming.
10 10
(...skipping 19 matching lines...) Expand all
30 #include <cmath> // rint 30 #include <cmath> // rint
31 using namespace std; 31 using namespace std;
32 32
33 #include "beam.hh" 33 #include "beam.hh"
34 #include "directional-element-interface.hh" 34 #include "directional-element-interface.hh"
35 #include "dot-column.hh" 35 #include "dot-column.hh"
36 #include "font-interface.hh" 36 #include "font-interface.hh"
37 #include "international.hh" 37 #include "international.hh"
38 #include "lookup.hh" 38 #include "lookup.hh"
39 #include "misc.hh" 39 #include "misc.hh"
40 #include "note-column.hh"
40 #include "note-head.hh" 41 #include "note-head.hh"
41 #include "output-def.hh" 42 #include "output-def.hh"
42 #include "paper-column.hh" 43 #include "paper-column.hh"
43 #include "pointer-group-interface.hh" 44 #include "pointer-group-interface.hh"
44 #include "rest.hh" 45 #include "rest.hh"
45 #include "rhythmic-head.hh" 46 #include "rhythmic-head.hh"
47 #include "script-interface.hh"
46 #include "side-position-interface.hh" 48 #include "side-position-interface.hh"
49 #include "simple-closure.hh"
47 #include "staff-symbol-referencer.hh" 50 #include "staff-symbol-referencer.hh"
48 #include "stem-tremolo.hh" 51 #include "stem-tremolo.hh"
49 #include "warn.hh" 52 #include "warn.hh"
50 53
51 void 54 void
52 Stem::set_beaming (Grob *me, int beam_count, Direction d) 55 Stem::set_beaming (Grob *me, int beam_count, Direction d)
53 { 56 {
54 SCM pair = me->get_property ("beaming"); 57 SCM pair = me->get_property ("beaming");
55 58
56 if (!scm_is_pair (pair)) 59 if (!scm_is_pair (pair))
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 243
241 MAKE_SCHEME_CALLBACK (Stem, pure_height, 3) 244 MAKE_SCHEME_CALLBACK (Stem, pure_height, 3)
242 SCM 245 SCM
243 Stem::pure_height (SCM smob, 246 Stem::pure_height (SCM smob,
244 SCM /* start */, 247 SCM /* start */,
245 SCM /* end */) 248 SCM /* end */)
246 { 249 {
247 Grob *me = unsmob_grob (smob); 250 Grob *me = unsmob_grob (smob);
248 Interval iv; 251 Interval iv;
249 252
250 if (!is_normal_stem (me) || ly_is_procedure (me->get_property_data ("glissando -stem"))) 253 if (!is_normal_stem (me))
251 return ly_interval2scm (iv); 254 return ly_interval2scm (iv);
252 255
253 Real ss = Staff_symbol_referencer::staff_space (me); 256 Real ss = Staff_symbol_referencer::staff_space (me);
254 Real rad = Staff_symbol_referencer::staff_radius (me); 257 Real rad = Staff_symbol_referencer::staff_radius (me);
255 258
256 if (!to_boolean (me->get_property ("cross-staff"))) 259 if (!to_boolean (me->get_property ("cross-staff")))
257 { 260 {
258 Real len_in_halfspaces; 261 Real len_in_halfspaces;
259 SCM user_set_len_scm = me->get_property_data ("length"); 262 SCM user_set_len_scm = me->get_property_data ("length");
260 if (scm_is_number (user_set_len_scm)) 263 if (scm_is_number (user_set_len_scm))
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 416 }
414 417
415 MAKE_SCHEME_CALLBACK (Stem, calc_positioning_done, 1); 418 MAKE_SCHEME_CALLBACK (Stem, calc_positioning_done, 1);
416 SCM 419 SCM
417 Stem::calc_positioning_done (SCM smob) 420 Stem::calc_positioning_done (SCM smob)
418 { 421 {
419 Grob *me = unsmob_grob (smob);·· 422 Grob *me = unsmob_grob (smob);··
420 if (!head_count (me)) 423 if (!head_count (me))
421 return SCM_BOOL_T; 424 return SCM_BOOL_T;
422 425
423 if (ly_is_procedure (me->get_property_data ("glissando-stem")))
424 return SCM_BOOL_T;
425
426 me->set_property ("positioning-done", SCM_BOOL_T); 426 me->set_property ("positioning-done", SCM_BOOL_T);
427 ·· 427 ··
428 extract_grob_set (me, "note-heads", ro_heads); 428 extract_grob_set (me, "note-heads", ro_heads);
429 vector<Grob*> heads (ro_heads); 429 vector<Grob*> heads (ro_heads);
430 vector_sort (heads, position_less); 430 vector_sort (heads, position_less);
431 Direction dir = get_grob_direction (me); 431 Direction dir = get_grob_direction (me);
432 432
433 if (dir < 0) 433 if (dir < 0)
434 reverse (heads); 434 reverse (heads);
435 435
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 return SCM_BOOL_T; 521 return SCM_BOOL_T;
522 } 522 }
523 523
524 MAKE_SCHEME_CALLBACK (Stem, calc_direction, 1); 524 MAKE_SCHEME_CALLBACK (Stem, calc_direction, 1);
525 SCM 525 SCM
526 Stem::calc_direction (SCM smob) 526 Stem::calc_direction (SCM smob)
527 { 527 {
528 Grob *me = unsmob_grob (smob); 528 Grob *me = unsmob_grob (smob);
529 Direction dir = CENTER; 529 Direction dir = CENTER;
530
531 // Trigger glissando stem positioning.
532 (void) me->get_property ("glissando-stem");
533 530
534 if (Grob *beam = unsmob_grob (me->get_object ("beam"))) 531 if (Grob *beam = unsmob_grob (me->get_object ("beam")))
535 { 532 {
536 SCM ignore_me = beam->get_property ("direction"); 533 SCM ignore_me = beam->get_property ("direction");
537 (void) ignore_me; 534 (void) ignore_me;
538 dir = get_grob_direction (me); 535 dir = get_grob_direction (me);
539 } 536 }
540 else 537 else
541 { 538 {
542 SCM dd = me->get_property ("default-direction"); 539 SCM dd = me->get_property ("default-direction");
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 return ly_interval2scm (r); 730 return ly_interval2scm (r);
734 } 731 }
735 732
736 Real 733 Real
737 Stem::thickness (Grob *me) 734 Stem::thickness (Grob *me)
738 { 735 {
739 return scm_to_double (me->get_property ("thickness")) 736 return scm_to_double (me->get_property ("thickness"))
740 * Staff_symbol_referencer::line_thickness (me); 737 * Staff_symbol_referencer::line_thickness (me);
741 } 738 }
742 739
740 MAKE_SCHEME_CALLBACK (Stem, calc_stem_begin_position, 1);
741 SCM
742 Stem::calc_stem_begin_position (SCM smob)
743 {
744 Grob *me = unsmob_grob (smob);
745 Direction d = get_grob_direction (me);
746 Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
747 Grob *lh
748 = to_boolean (me->get_property ("avoid-note-head"))
749 ? last_head (me)
750 : first_head (me);
751
752 Real pos = Staff_symbol_referencer::get_position (lh);
753
754 if (Grob *head = support_head (me))
755 {
756 Interval head_height = head->extent (head, Y_AXIS);
757 Real y_attach = Note_head::stem_attachment_coordinate (head, Y_AXIS);
758
759 y_attach = head_height.linear_combination (y_attach);
760 pos += d * y_attach / half_space;
761 }
762
763 return scm_from_double (pos);
764 }
765
743 MAKE_SCHEME_CALLBACK (Stem, print, 1); 766 MAKE_SCHEME_CALLBACK (Stem, print, 1);
744 SCM 767 SCM
745 Stem::print (SCM smob) 768 Stem::print (SCM smob)
746 { 769 {
747 Grob *me = unsmob_grob (smob); 770 Grob *me = unsmob_grob (smob);
748 Grob *beam = get_beam (me); 771 Grob *beam = get_beam (me);
749 772
750 Stencil mol; 773 Stencil mol;
751 Direction d = get_grob_direction (me); 774 Direction d = get_grob_direction (me);
752 775
(...skipping 18 matching lines...) Expand all
771 return SCM_EOL; 794 return SCM_EOL;
772 795
773 if (is_invisible (me)) 796 if (is_invisible (me))
774 return SCM_EOL; 797 return SCM_EOL;
775 798
776 Real y2 = robust_scm2double (me->get_property ("stem-end-position"), 0.0); 799 Real y2 = robust_scm2double (me->get_property ("stem-end-position"), 0.0);
777 Real y1 = y2; 800 Real y1 = y2;
778 Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5; 801 Real half_space = Staff_symbol_referencer::staff_space (me) * 0.5;
779 802
780 if (lh) 803 if (lh)
781 y2 = Staff_symbol_referencer::get_position (lh); 804 y2 = robust_scm2double (me->get_property ("stem-begin-position"), 0.0);
782 else if (stemlet) 805 else if (stemlet)
783 { 806 {
784 Real beam_translation = Beam::get_beam_translation (beam); 807 Real beam_translation = Beam::get_beam_translation (beam);
785 Real beam_thickness = Beam::get_beam_thickness (beam); 808 Real beam_thickness = Beam::get_beam_thickness (beam);
786 int beam_count = beam_multiplicity (me).length () + 1; 809 int beam_count = beam_multiplicity (me).length () + 1;
787 810
788 y2 -= d 811 y2 -= d
789 * (0.5 * beam_thickness 812 * (0.5 * beam_thickness
790 + beam_translation * max (0, (beam_count - 1)) 813 + beam_translation * max (0, (beam_count - 1))
791 + stemlet_length) / half_space; 814 + stemlet_length) / half_space;
792 } 815 }
793 816
794 Interval stem_y (min (y1, y2), max (y2, y1)); 817 Interval stem_y (min (y1, y2), max (y2, y1));
795
796 if (Grob *head = support_head (me))
797 {
798 /*
799 must not take ledgers into account.
800 */
801 Interval head_height = head->extent (head, Y_AXIS);
802 Real y_attach = Note_head::stem_attachment_coordinate (head, Y_AXIS);
803
804 y_attach = head_height.linear_combination (y_attach);
805 stem_y[Direction (-d)] += d * y_attach / half_space;
806 }
807 818
808 // URG 819 // URG
809 Real stem_width = thickness (me); 820 Real stem_width = thickness (me);
810 Real blot 821 Real blot
811 = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter")); 822 = me->layout ()->get_dimension (ly_symbol2scm ("blot-diameter"));
812 823
813 Box b = Box (Interval (-stem_width / 2, stem_width / 2), 824 Box b = Box (Interval (-stem_width / 2, stem_width / 2),
814 Interval (stem_y[DOWN] * half_space, stem_y[UP] * half_space)); 825 Interval (stem_y[DOWN] * half_space, stem_y[UP] * half_space));
815 826
816 Stencil ss = Lookup::round_filled_box (b, blot); 827 Stencil ss = Lookup::round_filled_box (b, blot);
(...skipping 24 matching lines...) Expand all
841 852
842 853
843 /* 854 /*
844 move the stem to right of the notehead if it is up. 855 move the stem to right of the notehead if it is up.
845 */ 856 */
846 MAKE_SCHEME_CALLBACK (Stem, offset_callback, 1); 857 MAKE_SCHEME_CALLBACK (Stem, offset_callback, 1);
847 SCM 858 SCM
848 Stem::offset_callback (SCM smob) 859 Stem::offset_callback (SCM smob)
849 { 860 {
850 Grob *me = unsmob_grob (smob); 861 Grob *me = unsmob_grob (smob);
851 if (ly_is_procedure (me->get_property_data ("glissando-stem")))
852 return scm_from_double (0.0);
853 862
854 extract_grob_set (me, "rests", rests); 863 extract_grob_set (me, "rests", rests);
855 if (rests.size ()) 864 if (rests.size ())
856 { 865 {
857 Grob *rest = rests.back (); 866 Grob *rest = rests.back ();
858 Real r = rest->extent (rest, X_AXIS).center (); 867 Real r = rest->extent (rest, X_AXIS).center ();
859 return scm_from_double (r); 868 return scm_from_double (r);
860 } 869 }
861 870
862 ·· 871 ··
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 return beam && Beam::is_cross_staff (beam); 1073 return beam && Beam::is_cross_staff (beam);
1065 } 1074 }
1066 1075
1067 MAKE_SCHEME_CALLBACK (Stem, calc_cross_staff, 1) 1076 MAKE_SCHEME_CALLBACK (Stem, calc_cross_staff, 1)
1068 SCM 1077 SCM
1069 Stem::calc_cross_staff (SCM smob) 1078 Stem::calc_cross_staff (SCM smob)
1070 { 1079 {
1071 return scm_from_bool (is_cross_staff (unsmob_grob (smob))); 1080 return scm_from_bool (is_cross_staff (unsmob_grob (smob)));
1072 } 1081 }
1073 1082
1074 MAKE_SCHEME_CALLBACK (Stem, glissando_stem_positioning, 1); 1083 MAKE_SCHEME_CALLBACK (Glissando_stem, after_line_breaking, 1);
1075 SCM 1084 SCM
1076 Stem::glissando_stem_positioning (SCM smob) 1085 Glissando_stem::after_line_breaking (SCM smob)
1077 { 1086 {message ("ALB");
1078 Grob *me = unsmob_grob (smob); 1087 Grob *me = unsmob_grob (smob);
1079 1088
1080 extract_grob_set (me, "glissandi", glissandi); 1089 extract_grob_set (me, "glissandi", glissandi);
1081 1090
1082 if (!glissandi.size ()) 1091 if (!glissandi.size ())
1083 { 1092 {
1084 me->programming_error ("This glissando stem does not have any glissandi to which it can attach. Killing stem."); 1093 me->programming_error ("This glissando stem does not have any glissandi to which it can attach. Killing stem.");
1085 me->suicide (); 1094 me->suicide ();
1086 return SCM_BOOL_F; 1095 return SCM_BOOL_F;
1087 } 1096 }
1088 1097
1089 // first, every note column must have two and only two notes. 1098 // first, every note column must have two and only two notes.
1090 extract_grob_set (me, "note-heads", note_heads); 1099 extract_grob_set (me, "note-heads", note_heads);
1091 if (note_heads.size () != 2) 1100 if (note_heads.size () != 2)
1092 { 1101 {
1093 programming_error ("Glissandi stem must have two and only two noteheads.") ; 1102 programming_error ("Glissandi stem does not have exactly two noteheads.");
1094 return SCM_BOOL_F; 1103 return SCM_BOOL_F;
1095 } 1104 }
1096 1105
1097 // now, position the note heads 1106 // now, position the note heads
1098 1107
1099 Grob *common[NO_AXES]; 1108 Grob *common[NO_AXES];
1100 1109
1101 Drul_array<Grob *> extremals = Stem::extremal_heads (me); 1110 Drul_array<Grob *> extremals = Stem::extremal_heads (me);
1102 1111
1103 for (Axis a = X_AXIS; a < NO_AXES; incr (a)) 1112 for (Axis a = X_AXIS; a < NO_AXES; incr (a))
(...skipping 27 matching lines...) Expand all
1131 } 1140 }
1132 while (flip (&d) != LEFT); 1141 while (flip (&d) != LEFT);
1133 1142
1134 Interval normalized_endpoints = robust_scm2interval (gls->get_property ("n ormalized-endpoints"), Interval (0, 1)); 1143 Interval normalized_endpoints = robust_scm2interval (gls->get_property ("n ormalized-endpoints"), Interval (0, 1));
1135 Real y_length = span_points[RIGHT][Y_AXIS] - span_points[LEFT][Y_AXIS]; 1144 Real y_length = span_points[RIGHT][Y_AXIS] - span_points[LEFT][Y_AXIS];
1136 1145
1137 span_points[LEFT][Y_AXIS] += normalized_endpoints[LEFT] * y_length; 1146 span_points[LEFT][Y_AXIS] += normalized_endpoints[LEFT] * y_length;
1138 span_points[RIGHT][Y_AXIS] -= (1 - normalized_endpoints[RIGHT]) * y_length ; 1147 span_points[RIGHT][Y_AXIS] -= (1 - normalized_endpoints[RIGHT]) * y_length ;
1139 // end code dup :) 1148 // end code dup :)
1140 1149
1141 SCM placement_function = gls->get_property ("stem-placement-function"); 1150 SCM placement_function = gls->get_property_data ("stem-placement-function" );
1142 Real pos = 0.0; 1151 Real pos = 0.0;
1143 1152
1144 if (placement_function != SCM_EOL) 1153 if (placement_function != SCM_EOL)
1145 { 1154 {
1146 pos = robust_scm2double (scm_call_4 (placement_function, 1155 pos = robust_scm2double (scm_call_4 (placement_function,
1147 scm_from_double (stem_pos), 1156 scm_from_double (stem_pos),
1148 ly_offset2scm (span_points[LEFT]) , 1157 ly_offset2scm (span_points[LEFT]) ,
1149 ly_offset2scm (span_points[RIGHT] ), 1158 ly_offset2scm (span_points[RIGHT] ),
1150 ly_interval2scm (normalized_endpo ints)), 1159 ly_interval2scm (normalized_endpo ints)),
1151 0.0); 1160 0.0);
1152 } 1161 }
1153 else 1162 else
1154 { 1163 {
1155 Real slope = (span_points[RIGHT][Y_AXIS] - span_points[LEFT][Y_AXIS]) / (span_points[RIGHT][X_AXIS] - span_points[LEFT][X_AXIS]); 1164 Real slope = (span_points[RIGHT][Y_AXIS] - span_points[LEFT][Y_AXIS]) / (span_points[RIGHT][X_AXIS] - span_points[LEFT][X_AXIS]);
1156 Real offset = span_points[RIGHT][Y_AXIS] - (span_points[RIGHT][X_AXIS] * slope); 1165 Real offset = span_points[RIGHT][Y_AXIS] - (span_points[RIGHT][X_AXIS] * slope);
1157 pos = slope * stem_pos + offset; 1166 pos = slope * stem_pos + offset;
1158 } 1167 }
1159 1168
1160 d = DOWN; 1169 d = DOWN;
1161 do 1170 do
1162 ypos[d] = minmax (d, ypos[d], pos); 1171 ypos[d] = minmax (d, ypos[d], pos);
1163 while (flip (&d) != DOWN); 1172 while (flip (&d) != DOWN);
1164 } 1173 }
1165 1174
1166 // Note that staff symbol positions are in half space : must multiply by 0.5 1175 // Note that staff symbol positions are in half space : must multiply by 0.5
1167 Direction d = DOWN; 1176 Direction d = DOWN;
1168 do 1177 do
1169 extremals[d]->translate_axis (ypos[d] - (0.5 * Staff_symbol_referencer::get_ position (extremals[d])), Y_AXIS); 1178 extremals[d]->translate_axis (ypos[d] - (0.5 * Staff_symbol_referencer::get_ position (extremals[d])), Y_AXIS);
1170 while (flip (&d) != DOWN); 1179 while (flip (&d) != DOWN);
1171 ·· 1180
1181 me->set_property ("direction", Stem::calc_direction_proc);
1182 me->set_property ("flag", Stem::calc_flag_proc);
1183 ··
1184 if (Grob *beam = Stem::get_beam (me))
1185 beam->set_property ("direction", Beam::calc_direction_proc);
1186
1187 if (Note_column::has_interface (me->get_parent (X_AXIS)))
1188 {
1189 extract_grob_set (me->get_parent (X_AXIS), "scripts", elts);
1190 for (vsize i = 0; i < elts.size(); i++)
1191 elts[i]->set_property ("direction", Script_interface::calc_opposite_dire ction_proc);
1192 }
1193
1194 if (Grob *tremolo = unsmob_grob (me->get_object ("tremolo-flag")))
1195 {
1196 tremolo->set_property ("style", Stem_tremolo::calc_style_proc);
1197 tremolo->set_property ("beam-width", Stem_tremolo::calc_width_proc);
1198 }
1199
1172 return SCM_BOOL_T; 1200 return SCM_BOOL_T;
1173 } 1201 }
1174 1202
1175 /* FIXME: Too many properties */ 1203 /* FIXME: Too many properties */
1176 ADD_INTERFACE (Stem, 1204 ADD_INTERFACE (Stem,
1177 "The stem represents the graphical stem. In addition, it" 1205 "The stem represents the graphical stem. In addition, it"
1178 " internally connects note heads, beams, and tremolos. Rests" 1206 " internally connects note heads, beams, and tremolos. Rests"
1179 " and whole notes have invisible stems.\n" 1207 " and whole notes have invisible stems.\n"
1180 "\n" 1208 "\n"
1181 "The following properties may be set in the @code{details}" 1209 "The following properties may be set in the @code{details}"
(...skipping 23 matching lines...) Expand all
1205 "beaming " 1233 "beaming "
1206 "beamlet-default-length " 1234 "beamlet-default-length "
1207 "beamlet-max-length-proportion " 1235 "beamlet-max-length-proportion "
1208 "default-direction " 1236 "default-direction "
1209 "details " 1237 "details "
1210 "direction " 1238 "direction "
1211 "duration-log " 1239 "duration-log "
1212 "flag " 1240 "flag "
1213 "flag-style " 1241 "flag-style "
1214 "french-beaming " 1242 "french-beaming "
1215 » "glissando-stem " 1243 » "length "
1244 » "length-fraction "
1245 » "max-beam-connect "
1246 » "neutral-direction "
1247 » "no-stem-extend "
1248 » "note-heads "
1249 » "positioning-done "
1250 » "rests "
1251 » "stem-begin-position "
1252 » "stem-end-position "
1253 » "stem-placement-function "
1254 » "stem-info "
1255 » "stemlet-length "
1256 » "stroke-style "
1257 » "thickness "
1258 » "tremolo-flag "
1259 » );
1260
1261 /* Fix me. Code dup. */
1262 ADD_INTERFACE (Glissando_stem,
1263 » "Like stems, but for glissandi",
1264
1265 » /* properties */
1266 » "avoid-note-head "
1267 » "beam "
1268 » "beaming "
1269 » "beamlet-default-length "
1270 » "beamlet-max-length-proportion "
1271 » "default-direction "
1272 » "details "
1273 » "direction "
1274 » "duration-log "
1275 » "flag "
1276 » "flag-style "
1277 » "french-beaming "
1278 » "glissandi "
1216 "length " 1279 "length "
1217 "length-fraction " 1280 "length-fraction "
1218 "max-beam-connect " 1281 "max-beam-connect "
1219 "neutral-direction " 1282 "neutral-direction "
1220 "no-stem-extend " 1283 "no-stem-extend "
1221 "note-heads " 1284 "note-heads "
1222 "positioning-done " 1285 "positioning-done "
1223 "rests " 1286 "rests "
1224 "stem-end-position " 1287 "stem-end-position "
1288 "stem-placement-function "
1225 "stem-info " 1289 "stem-info "
1226 "stemlet-length " 1290 "stemlet-length "
1227 "stroke-style " 1291 "stroke-style "
1228 "thickness " 1292 "thickness "
1229 "tremolo-flag " 1293 "tremolo-flag "
1230 ); 1294 );
1231 1295
1232 /****************************************************************/ 1296 /****************************************************************/
1233 1297
1234 Stem_info::Stem_info () 1298 Stem_info::Stem_info ()
1235 { 1299 {
1236 ideal_y_ = shortest_y_ = 0; 1300 ideal_y_ = shortest_y_ = 0;
1237 dir_ = CENTER; 1301 dir_ = CENTER;
1238 } 1302 }
1239 1303
1240 void 1304 void
1241 Stem_info::scale (Real x) 1305 Stem_info::scale (Real x)
1242 { 1306 {
1243 ideal_y_ *= x; 1307 ideal_y_ *= x;
1244 shortest_y_ *= x; 1308 shortest_y_ *= x;
1245 } 1309 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b