lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug?] Line_interface::line


From: Juergen Reuter
Subject: [bug?] Line_interface::line
Date: Fri, 17 Sep 2004 11:36:53 +0200 (CEST)

Line_interface::line says:


  SCM type = me->get_property ("style");

  SCM dash_fraction = me->get_property ("dash-fraction");
  if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
    {
      
      Real fraction
        = type == ly_symbol2scm ("dotted-line")
        ? 0.0
        : robust_scm2double (dash_fraction, 0.4);
      
      fraction = (fraction >? 0) <? 1.0;
      Real period = Staff_symbol_referencer::staff_space (me)
        * robust_scm2double (me->get_property ("dash-period"), 1.0);

      if (period < 0)
        return Stencil ();
  
      return make_dashed_line (thick, from, to, period, fraction);
    }
  else
    {
      return make_line (thick, from, to);
    }


Are you sure that the "else" branch (i.e. making a solid line) should be 
regardless of the "style" property entered only if "scm_is_number 
(dash_fraction)" evaluates to false?

Greetings,
J├╝rgen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]