X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fline-interface.cc;h=c7bf67a406ce8eed60a02400bb8489bbd6b17498;hb=11cba325e71f6c1bc720ae79d43739130a5f83ae;hp=6d2d44045a58b1f714587a891b5fdfe63f2c5134;hpb=6fb6249345ce846c8c55f843b21c6e85024a720b;p=lilypond.git diff --git a/lily/line-interface.cc b/lily/line-interface.cc index 6d2d44045a..c7bf67a406 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -1,9 +1,20 @@ /* - line-interface.cc -- implement Line_interface + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2004--2009 Han-Wen Nienhuys - (c) 2004--2007 Han-Wen Nienhuys + 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 "line-interface.hh" @@ -111,13 +122,7 @@ Line_interface::make_zigzag_line (Grob *me, total.add_stencil (moved_squiggle); } - Box b; - b.add_point (Offset (0, 0)); - b.add_point (dz); - b[X_AXIS].widen (thick / 2); - b[Y_AXIS].widen (thick / 2); - - return Stencil (b, total.expr ()); + return total; } @@ -210,7 +215,7 @@ Line_interface::line (Grob *me, Offset from, Offset to) else if (type == ly_symbol2scm ("trill")) return make_trill_line (me, from, to); - Stencil stil; + Stencil stencil; if (type == ly_symbol2scm ("dashed-line") || type == ly_symbol2scm ("dotted-line")) { @@ -239,24 +244,24 @@ Line_interface::line (Grob *me, Offset from, Offset to) */ period = ((to-from).length () - period * fraction) / n; } - stil = make_dashed_line (thick, from, to, period, fraction); + stencil = make_dashed_line (thick, from, to, period, fraction); } else - stil = make_line (thick, from, to); + stencil = make_line (thick, from, to); - return stil; + return stencil; } ADD_INTERFACE (Line_interface, - "Generic line objects. Any object using lines supports this. " - "The property @code{style} can be @code{line}, " - "@code{dashed-line}, @code{trill}, @code{dotted-line} or " - "@code{zigzag}.\n" + "Generic line objects. Any object using lines supports this." + " The property @code{style} can be @code{line}," + " @code{dashed-line}, @code{trill}, @code{dotted-line} or" + " @code{zigzag}.\n" "\n" - "For @code{dashed-line}, the length of the dashes is tuned " - "with @code{dash-fraction}. If the latter is set to@tie{}0, a " - "dotted line is produced. If @code{dash-period} is negative, " - "the line is made transparent.", + "For @code{dashed-line}, the length of the dashes is tuned" + " with @code{dash-fraction}. If the latter is set to@tie{}0, a" + " dotted line is produced. If @code{dash-period} is negative," + " the line is made transparent.", /* properties */ "dash-period "