- {
- me->warning (_ ("ascending vaticana style flexa"));
- }
-
- Real width;
- SCM flexa_width_scm = me->get_grob_property ("flexa-width");
- if (flexa_width_scm != SCM_EOL)
- {
- width = gh_scm2double (flexa_width_scm);
- }
- else
- {
- me->warning ("Vaticana_ligature:"
- "flexa-width undefined; assuming 2.0");
- width = 2.0 * staff_space;
- }
-
- bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
-
- // Compensate thickness that appears to be smaller in steep section
- // of bend.
- Real left_height =
- right_height +
- min (0.12 * abs(interval), 0.3) * staff_space;
-
- if (add_stem)
- {
- bool consider_interval =
- stem_direction * interval > 0.0;
-
- Interval stem_box_x (0, thickness);
- Interval stem_box_y;
-
- if (consider_interval)
- {
- Real y_length = max (abs(interval)/2.0*staff_space +
- (right_height-left_height),
- 1.2*staff_space);
- stem_box_y = Interval (0, y_length);
- }
- else
- stem_box_y = Interval (0, staff_space);
-
- Real y_correction =
- (stem_direction == UP) ?
- +0.5*left_height :
- -0.5*left_height - stem_box_y.length();
-
- Box stem_box (stem_box_x, stem_box_y);
- Molecule stem = Lookup::filledbox (stem_box);
- stem.translate_axis (y_correction, Y_AXIS);
- molecule.add_molecule(stem);
- }
-
- // Compensate optical illusion regarding vertical position of left
- // and right endings due to curved shape.
- Real ypos_correction = -0.1*staff_space * sign(interval);
- Real interval_correction = 0.2*staff_space * sign(interval);
- Real corrected_interval = interval*staff_space + interval_correction;
-
- // middle curve of flexa shape
+ me->warning (_ ("ascending vaticana style flexa"));
+
+ Real width = robust_scm2double (me->get_property ("flexa-width"), 2);
+
+ /*
+ * Compensate curve thickness that appears to be smaller in steep
+ * section of bend.
+ */
+ Real left_height
+ = right_height
+ + min (0.12 * abs (interval), 0.3) * staff_space;
+
+ /*
+ * Compensate optical illusion regarding vertical position of left
+ * and right endings due to curved shape.
+ */
+ Real ypos_correction = -0.1 * staff_space * sign (interval);
+ Real interval_correction = 0.2 * staff_space * sign (interval);
+ Real corrected_interval = interval * staff_space + interval_correction;
+
+ /*
+ * middle curve of flexa shape
+ */