/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1999--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1999--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Grob *g = unsmob_grob (sg);
Real pos = Staff_symbol_referencer::get_position (g);
- if (fabs (rint (pos) -pos) < 1e-6) // ugh.
+ if (fabs (rint (pos) - pos) < 1e-6) // ugh.
return scm_from_int ((int) my_round (pos));
else
return scm_from_double (pos);
LY_DEFINE (ly_staff_symbol_line_thickness, "ly:staff-symbol-line-thickness",
1, 0, 0, (SCM grob),
- "Returns the @code{line-thickness} of the staff associated"
- " with @var{grob}.")
+ "Returns the current staff-line thickness in the staff"
+ " associated with @var{grob}, expressed as a multiple of the"
+ " current staff-space height.")
{
LY_ASSERT_SMOB (Grob, grob, 1);
Grob *g = unsmob_grob (grob);
LY_DEFINE (ly_staff_symbol_staff_space, "ly:staff-symbol-staff-space",
1, 0, 0, (SCM grob),
- "Returns the @code{staff-space} of the staff associated"
- " with @var{grob}.")
+ "Returns the current staff-space height in the staff"
+ " associated with @var{grob}, expressed as a multiple of the"
+ " default height of a staff-space in the traditional"
+ " five-line staff.")
{
LY_ASSERT_SMOB (Grob, grob, 1);
Grob *g = unsmob_grob (grob);
Real staff_space = Staff_symbol_referencer::staff_space (g);
return scm_from_double (staff_space);
}
+
+LY_DEFINE (ly_staff_symbol_staff_radius, "ly:staff-symbol-staff-radius",
+ 1, 0, 0, (SCM grob),
+ "Returns the radius of the staff associated with"
+ " @var{grob}.")
+{
+ LY_ASSERT_SMOB (Grob, grob, 1);
+ Grob *g = unsmob_grob (grob);
+ Real staff_radius = Staff_symbol_referencer::staff_radius (g);
+ return scm_from_double (staff_radius);
+}