]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vaticana-ligature.cc
The grand \paper -> \layout, \bookpaper -> \paper renaming.
[lilypond.git] / lily / vaticana-ligature.cc
index ea1d4d447e6c5b253a76d0633876f12aa277b8d7..7cc2263c44e8a44e432ac69aee4d1e0576ccf136 100644 (file)
@@ -14,7 +14,7 @@
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 #include "note-head.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
 #include "bezier.hh"
 #include "warn.hh"
 
@@ -78,7 +78,7 @@ vaticana_brew_flexa (Grob *me,
   SCM flexa_height_scm = me->get_property ("flexa-height");
   if (flexa_height_scm != SCM_EOL)
     {
-      interval = ly_scm2int (flexa_height_scm);
+      interval = scm_to_int (flexa_height_scm);
     }
   else
     {
@@ -190,30 +190,8 @@ vaticana_brew_join (Grob *me, int delta_pitch,
   return Lookup::round_filled_box (join_box, blotdiameter);
 }
 
-void
-vaticana_add_ledger_lines (Grob *me, Stencil *out, int pos, Real offs,
-                          bool ledger_take_space)
-{
-  int interspaces = Staff_symbol_referencer::line_count (me)-1;
-  if (abs (pos) - interspaces > 1)
-    {
-      Interval hd = out->extent (X_AXIS);
-      Real left_ledger_protusion = hd.length ()/4;
-      Real right_ledger_protusion = left_ledger_protusion;
-
-      Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
-                                    hd[RIGHT] + right_ledger_protusion);
-      Stencil ledger_lines =
-       Note_head::brew_ledger_lines (me, pos, interspaces,
-                                     l_extents, 0,
-                                     ledger_take_space);
-      ledger_lines.translate_axis (offs, Y_AXIS);
-      out->add_stencil (ledger_lines);
-    }
-}
-
 Stencil
-vaticana_brew_primitive (Grob *me, bool ledger_take_space)
+vaticana_brew_primitive (Grob *me)
 {
   SCM glyph_name_scm = me->get_property ("glyph-name");
   if (glyph_name_scm == SCM_EOL)
@@ -226,21 +204,20 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
   String glyph_name = ly_scm2string (glyph_name_scm);
 
   Stencil out;
-  int flexa_height = 0;
   Real thickness = robust_scm2double ( me->get_property ("thickness"), 1);
 
   Real line_thickness =
-    thickness * me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+    thickness * me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
 
   Real blotdiameter =
-    (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+    (me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter")));
 
   int pos = Staff_symbol_referencer::get_rounded_position (me);
 
   SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
   if (delta_pitch_scm != SCM_EOL)
-    delta_pitch = ly_scm2int (delta_pitch_scm);
+    delta_pitch = scm_to_int (delta_pitch_scm);
   else
     delta_pitch = 0;
 
@@ -302,14 +279,6 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
       out.add_stencil (join);
     }
 
-  vaticana_add_ledger_lines (me, &out, pos, 0, ledger_take_space);
-  if (!String::compare (glyph_name, "flexa"))
-    {
-      pos += flexa_height;
-      vaticana_add_ledger_lines (me, &out, pos, 0.5*flexa_height,
-                               ledger_take_space);
-    }
-
   return out;
 }
 
@@ -318,7 +287,7 @@ SCM
 Vaticana_ligature::brew_ligature_primitive (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  SCM primitive = vaticana_brew_primitive (me, false).smobbed_copy ();
+  SCM primitive = vaticana_brew_primitive (me).smobbed_copy ();
   return primitive;
 }