source file of the GNU LilyPond music typesetter
- (c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <math.h>
#include <ctype.h>
#include "warn.hh"
#include "font-interface.hh"
#include "molecule.hh"
-#include "musical-request.hh"
+#include "event.hh"
#include "rhythmic-head.hh"
#include "staff-symbol-referencer.hh"
#include "lookup.hh"
*/
+/*
+ TODO: ledger lines are also a property of the staff. Maybe move them
+ to there?
+ */
Molecule
Note_head::brew_ledger_lines (Grob *me,
int pos,
if (lines_i)
{
Real ledgerlinethickness =
- (me->get_paper ()->get_var ("ledgerlinethickness"));
+ (me->get_paper ()->get_realvar (ly_symbol2scm ("ledgerlinethickness")));
Real blotdiameter = ledgerlinethickness;
- // (me->get_paper ()->get_var ("blotdiameter"));
+ // (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
Interval y_extent =
Interval (-0.5*(ledgerlinethickness),
+0.5*(ledgerlinethickness));
Box ledger_line (x_extent, y_extent);
Molecule proto_ledger_line =
- Lookup::roundfilledbox (ledger_line, blotdiameter);
+ Lookup::round_filled_box (ledger_line, blotdiameter);
if (!take_space)
proto_ledger_line.set_empty (true);
SCM style = me->get_grob_property ("style");
if (!gh_symbol_p (style))
{
- return Molecule();
+ return Molecule ();
}
- /*
- ugh: use gh_call () / scm_apply ().
-
- UGH: use grob-property.
- */
SCM log = gh_int2scm (Note_head::get_balltype (me));
- SCM exp = scm_list_n (ly_symbol2scm ("find-notehead-symbol"), log,
- ly_quote_scm (style),
- SCM_UNDEFINED);
- SCM scm_font_char = scm_primitive_eval (exp);
+ SCM proc = me->get_grob_property ("glyph-name-procedure");
+ SCM scm_font_char = scm_call_2 (proc, log, style);
String font_char = "noteheads-" + ly_scm2string (scm_font_char);
Font_metric * fm = Font_interface::get_default_font (me);
Pitch* pit = unsmob_pitch (spitch);
char s[2] = "a";
- s[0] = (pit->notename_ + 2)%7 + 'a';
+ s[0] = (pit->get_notename () + 2)%7 + 'a';
s[0] = toupper (s[0]);
SCM charstr = scm_makfrom0str (s);
ADD_INTERFACE (Note_head,"note-head-interface",
"Note head",
- "accidental-grob style stem-attachment-function");
+ "glyph-name-procedure accidental-grob style stem-attachment-function");