+2002-10-23 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * input/regression/multi-measure-rest-center.ly: new file.
+
+ * lily/multi-measure-rest.cc (big_rest): multi measure rest was
+ off horizontally by 0.05 ss. Fixed.
+
2002-10-22 Han-Wen Nienhuys <hanwen@cs.uu.nl>
* lily/tie.cc (get_control_points): also avoid staff lines on the
Molecule
Multi_measure_rest::big_rest (Grob *me, Real width)
{
- Real thick = gh_scm2double (me->get_grob_property ("thickness"));
+ Real tthick = gh_scm2double (me->get_grob_property ("thick-thickness"));
+ Real hair_thick = gh_scm2double (me->get_grob_property ("hair-thickness"));
+
+
Real ss = Staff_symbol_referencer::staff_space (me);
Real slt = me->get_paper ()->get_var ("linethickness");
- Real y = slt * thick/2 * ss;
- Box b(Interval (0, width), Interval (-y, y));
- Real ythick = slt * ss;
+ Real y = slt * tthick/2 * ss;
+ Real ythick = hair_thick * slt * ss;
+ Box b(Interval (0, width - 2 * ythick), Interval (-y, y));
Molecule m = Lookup::filledbox (b);
- Molecule yb = Lookup::filledbox (Box (Interval (-ythick, ythick), Interval (-ss, ss)));
+ Molecule yb = Lookup::filledbox (Box (Interval (-0.5, 0.5)* ythick, Interval (-ss, ss)));
- m.add_at_edge (X_AXIS, RIGHT, yb, -ythick);
- m.add_at_edge (X_AXIS, LEFT, yb, -ythick);
+ m.add_at_edge (X_AXIS, RIGHT, yb, 0);
+ m.add_at_edge (X_AXIS, LEFT, yb, 0);
m.align_to (X_AXIS, LEFT);
ADD_INTERFACE (Multi_measure_rest,"multi-measure-rest-interface",
"A rest that spans a whole number of measures.\n",
- "expand-limit measure-count thickness use-breve-rest");
+ "expand-limit measure-count hair-thickness thick-thickness use-breve-rest");
{
Grob *me = unsmob_grob (element_smob);
-
Direction d = Side_position_interface::get_direction (me);
- if (Staff_symbol_referencer::has_interface (me))
+ Grob * stsym = Staff_symbol_referencer::get_staff_symbol (me);
+ if (stsym)
{
Real p = Staff_symbol_referencer::get_position (me);
Real rp = directed_round (p, d);
ADD_INTERFACE (Side_position_interface,"side-position-interface",
- "Position a victim object (this one) next to other objects (the
-support). In this case, the direction signifies where to put the
-victim object relative to the support (left or right, up or down?)
-",
+ "Position a victim object (this one) next to other objects (the "
+"support). In this case, the direction signifies where to put the "
+"victim object relative to the support (left or right, up or down?) "
+,
"side-support-elements direction-source direction side-relative-direction minimum-space padding");