]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/line-interface.cc
*** empty log message ***
[lilypond.git] / lily / line-interface.cc
index 091eac7cf1050d3e9b3202276568a08332663212..6ee25751961fe8c59c29333f88c97a89ecc82725 100644 (file)
@@ -8,12 +8,10 @@ source file of the GNU LilyPond music typesetter
  */
 
 #include "line-interface.hh"
-#include "stencil.hh"
-#include "grob.hh"
+
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
-#include "paper-def.hh"
-
+#include "output-def.hh"
 
 Stencil
 Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
@@ -24,11 +22,11 @@ Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
   Real off = dash_period - on;
   
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                       gh_double2scm (thick), 
-                       gh_double2scm (on),
-                       gh_double2scm (off),
-                       gh_double2scm (to[X_AXIS] - from[X_AXIS]),
-                       gh_double2scm (to[Y_AXIS] - from[Y_AXIS]),
+                       scm_make_real (thick), 
+                       scm_make_real (on),
+                       scm_make_real (off),
+                       scm_make_real (to[X_AXIS] - from[X_AXIS]),
+                       scm_make_real (to[Y_AXIS] - from[Y_AXIS]),
                        SCM_UNDEFINED);
   
   Box box;
@@ -47,11 +45,11 @@ Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                       gh_double2scm (th), 
-                       gh_double2scm (from[X_AXIS]),
-                       gh_double2scm (from[Y_AXIS]),
-                       gh_double2scm (to[X_AXIS]),
-                       gh_double2scm (to[Y_AXIS]),
+                       scm_make_real (th), 
+                       scm_make_real (from[X_AXIS]),
+                       scm_make_real (from[Y_AXIS]),
+                       scm_make_real (to[X_AXIS]),
+                       scm_make_real (to[Y_AXIS]),
                        SCM_UNDEFINED);
 
   Box box;
@@ -68,12 +66,12 @@ Stencil
 Line_interface::line (Grob *me, Offset from, Offset to)
 {
   Real thick = Staff_symbol_referencer::line_thickness (me)
-    * robust_scm2double (me->get_grob_property ("thickness"),1);
+    * robust_scm2double (me->get_property ("thickness"),1);
   
-  SCM type = me->get_grob_property ("style");
+  SCM type = me->get_property ("style");
 
-  SCM dash_fraction = me->get_grob_property ("dash-fraction");
-  if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+  SCM dash_fraction = me->get_property ("dash-fraction");
+  if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
     {
       
       Real fraction
@@ -83,7 +81,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
       
       fraction = (fraction >? 0) <? 1.0;
       Real period = Staff_symbol_referencer::staff_space (me)
-       * robust_scm2double (me->get_grob_property ("dash-period"), 1.0);
+       * robust_scm2double (me->get_property ("dash-period"), 1.0);
 
       if (period < 0)
        return Stencil ();
@@ -96,12 +94,12 @@ Line_interface::line (Grob *me, Offset from, Offset to)
     }
 }
 
-ADD_INTERFACE(Line_interface, "line-interface",
+ADD_INTERFACE (Line_interface, "line-interface",
              "Generic line objects. Any object using lines supports this.  Normally,"
-             "you get a straight line. If dash-period is defined, a dashed line is "
-             "produced; the length of the dashes is tuned with" 
+             "you get a straight line. If @code{dash-period} is defined, a dashed line is "
+             "produced; the length of the dashes is tuned with 
              "@code{dash-fraction}. If the latter is set to 0, a dotted line is "
-             "produced. If @code{dash-fraction} is negative, the line is set "
+             "produced. If @code{dash-fraction} is negative, the line is made "
              "transparent.",
              
              "dash-period dash-fraction thickness style")