]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/line-interface.cc
Issue 4914/1: Move Output_property_engraver to Score level
[lilypond.git] / lily / line-interface.cc
index c12019ce0168957cb8a110f8244d9ecd451d6f0a..f23b58e3084be45de601b5b04f771cf2fb4b3aab 100644 (file)
@@ -25,8 +25,6 @@
 #include "output-def.hh"
 #include "staff-symbol-referencer.hh"
 
-using std::vector;
-
 Stencil
 Line_interface::make_arrow (Offset begin, Offset end,
                             Real thick,
@@ -124,9 +122,9 @@ Stencil
 Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
                                   Real dash_period, Real dash_fraction)
 {
-  dash_fraction = std::min (std::max (dash_fraction, 0.0), 1.0);
-  Real on = dash_fraction * dash_period + thick;
-  Real off = std::max (0.0, dash_period - on);
+  dash_fraction = min (max (dash_fraction, 0.0), 1.0);
+  Real on = dash_fraction * dash_period
+  Real off = max (0.0, dash_period - on - thick);
 
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
                        scm_from_double (thick),
@@ -220,7 +218,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
           ? 0.0
           : robust_scm2double (me->get_property ("dash-fraction"), 0.4);
 
-      fraction = std::min (std::max (fraction, 0.0), 1.0);
+      fraction = min (max (fraction, 0.0), 1.0);
       Real period = Staff_symbol_referencer::staff_space (me)
                     * robust_scm2double (me->get_property ("dash-period"), 1.0);
 
@@ -230,7 +228,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
       Real len = (to - from).length ();
 
       int n = (int) rint ((len - period * fraction) / period);
-      n = std::max (0, n);
+      n = max (0, n);
       if (n > 0)
         {
           /*