]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol-referencer-scheme.cc
Add ly:staff-symbol-line-thickness Scheme-callback, returning line thickness
[lilypond.git] / lily / staff-symbol-referencer-scheme.cc
index efa0fcd73d592b44e2887aaf9c1f19a9b418e74c..d8f2e6386203f4851ac7332f978943cdb7abe9d7 100644 (file)
@@ -37,3 +37,13 @@ LY_DEFINE (ly_position_on_line_p, "ly:position-on-line?",
   bool on_line = st ? Staff_symbol::on_line (g, pos) : false;
   return scm_from_bool (on_line);
 }
+
+LY_DEFINE (ly_staff_symbol_line_thickness, "ly:staff-symbol-line-thickness",
+           1, 0, 0, (SCM grob),
+           "Returns the line-thickness of the staff associated with @var{grob}.")
+{
+  LY_ASSERT_SMOB (Grob, grob, 1);
+  Grob *g = unsmob_grob (grob);
+  Real thickness = Staff_symbol_referencer::line_thickness (g);
+  return scm_from_double (thickness);
+}