X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-symbol-referencer-scheme.cc;h=1fe886ec0a5a76ee169f2869600419614a58db68;hb=ae0495dda1032c3994c770d727c65b46e702459c;hp=35cd814f0c10fba5870530609b2b7bf9eee5e9b7;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/lily/staff-symbol-referencer-scheme.cc b/lily/staff-symbol-referencer-scheme.cc index 35cd814f0c..1fe886ec0a 100644 --- a/lily/staff-symbol-referencer-scheme.cc +++ b/lily/staff-symbol-referencer-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1999--2011 Han-Wen Nienhuys + Copyright (C) 1999--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,3 +71,14 @@ LY_DEFINE (ly_staff_symbol_staff_space, "ly:staff-symbol-staff-space", 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); +}