X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flookup.cc;h=207dd06bf444e242740ae7dc5ac11cada8afad2d;hb=292ac10aee40154613568fc4805e02124793e91d;hp=f856fa5be931541b95a2a6e1828759826d8d7e2b;hpb=6467c63cd68e815c0175d59b9ef846dd90337510;p=lilypond.git diff --git a/lily/lookup.cc b/lily/lookup.cc index f856fa5be9..207dd06bf4 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -1,11 +1,22 @@ /* - lookup.cc -- implement simple Lookup methods. + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter - - (c) 1997--2009 Han-Wen Nienhuys + Copyright (C) 1997--2010 Han-Wen Nienhuys Jan Nieuwenhuizen + + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "lookup.hh" @@ -348,8 +359,9 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick, { Stencil return_value; - /* calculate the offset for the two beziers that make the sandwich - * for the slur + /* + calculate the offset for the two beziers that make the sandwich + for the slur */ Real alpha = (curve.control_[3] - curve.control_[0]).arg (); Bezier back = curve; @@ -360,22 +372,14 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick, curve.control_[1] -= perp; curve.control_[2] -= perp; -/* Bezier test1, test2, test3, test4; - test1 = back.extract(0., 1.0) ; - test2 = curve.extract (0., 1.0); - test3 = back.extract(0.0, 0.2); - test4 = curve.extract (0.0, 0.2); - return_value = bezier_sandwich (test1, test2, linethick); -// return_value.add_stencil ( -// bezier_sandwich (test3, test4, linethick)); - return return_value; */ - - if ((dash_details == SCM_UNDEFINED) || (dash_details == SCM_EOL)) - { /* solid slur */ + if (!scm_is_pair (dash_details)) + { + /* solid slur */ return_value = bezier_sandwich (back, curve, linethick); } else - { /* dashed or combination slur */ + { + /* dashed or combination slur */ int num_segments = scm_to_int (scm_length (dash_details)); for (int i=0; i