source file of the GNU LilyPond music typesetter
- (c) 1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
Interval (min_y, max_y));
- SCM at = gh_list (ly_symbol2scm ("beam"),
+ SCM at = scm_list_n (ly_symbol2scm ("beam"),
gh_double2scm (width),
gh_double2scm (slope),
gh_double2scm (thick),
l = gh_cons (ly_offset2scm (b.control_[i]), l);
}
- SCM at = (gh_list (ly_symbol2scm ("dashed-slur"),
+ SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
gh_double2scm (thick),
gh_double2scm (dash),
ly_quote_scm (l),
Molecule
Lookup::filledbox (Box b)
{
- SCM at = (gh_list (ly_symbol2scm ("filledbox"),
+ SCM at = (scm_list_n (ly_symbol2scm ("filledbox"),
gh_double2scm (-b[X_AXIS][LEFT]),
gh_double2scm (b[X_AXIS][RIGHT]),
gh_double2scm (-b[Y_AXIS][DOWN]),
{
Real alpha = (curve.control_[3] - curve.control_[0]).arg ();
Bezier back = curve;
-
+ Offset perp = curvethick * complex_exp (Offset (0, alpha + M_PI/2)) * 0.5;
back.reverse ();
- back.control_[1] += curvethick * complex_exp (Offset (0, alpha + M_PI/2));
- back.control_[2] += curvethick * complex_exp (Offset (0, alpha + M_PI/2));
+ back.control_[1] += perp;
+ back.control_[2] += perp;
+ curve.control_[1] -= perp;
+ curve.control_[2] -= perp;
+
SCM scontrols[8];
for (int i=4; i--;)
}
- SCM at = (gh_list (ly_symbol2scm ("bezier-sandwich"),
+ SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
ly_quote_scm (list),
gh_double2scm (linethick),
SCM_UNDEFINED));
+ Box b(curve.extent (X_AXIS),
+ curve.extent (Y_AXIS));
+
+ b[X_AXIS].unite (back.extent (X_AXIS));
+ b[Y_AXIS].unite (back.extent (Y_AXIS));
- Box b (curve.extent (X_AXIS), curve.extent (Y_AXIS));
return Molecule (b, at);
}
Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
{
Molecule m;
- String sym = ly_scm2string (gh_car (s));
- String reg = ly_scm2string (gh_car (gh_cdr (s)));
+ String sym = ly_scm2string (ly_car (s));
+ String reg = ly_scm2string (ly_car (ly_cdr (s)));
if (sym == "Discant")
{
return m;
}
+/*
+ TODO: should use slope instead? Angle gives nasty rad <-> degree
+ conversions.
+*/
+Molecule
+Lookup::repeat_slash (Real w, Real s, Real t)
+{
+ SCM wid = gh_double2scm (w);
+ SCM sl = gh_double2scm (s);
+ SCM thick = gh_double2scm (t);
+ SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
+ wid, sl, thick, SCM_UNDEFINED);
+
+ Box b (Interval (0, w + sqrt (sqr(t/s) + sqr (t))),
+ Interval (0, w * s));
+
+ return Molecule (b, slashnodot); // http://slashnodot.org
+}