summaryrefslogtreecommitdiff
path: root/lily/percent-repeat-item.cc
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2005-03-10 14:36:16 +0000
committerJan Nieuwenhuizen <janneke@gnu.org>2005-03-10 14:36:16 +0000
commit58bcc84c9480dae1b21bc24d8396b91fe19e0131 (patch)
tree5aeb331a20e1d259376ebf419f71fdd1ca1ab90e /lily/percent-repeat-item.cc
parent8942177c7566bc201b53d7829f23523961e80537 (diff)
* flower
* lily * kpath-guile: Nitpick run: buildscripts/fixcc.py.
Diffstat (limited to 'lily/percent-repeat-item.cc')
-rw-r--r--lily/percent-repeat-item.cc31
1 files changed, 14 insertions, 17 deletions
diff --git a/lily/percent-repeat-item.cc b/lily/percent-repeat-item.cc
index 51b3f81a16..8dad52aba3 100644
--- a/lily/percent-repeat-item.cc
+++ b/lily/percent-repeat-item.cc
@@ -1,11 +1,10 @@
-/*
+/*
percent-repeat-item.cc -- implement Percent_repeat_item_interface
-
+
source file of the GNU LilyPond music typesetter
-
+
(c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
- */
+*/
#include "percent-repeat-item.hh"
@@ -15,14 +14,14 @@
#include "font-interface.hh"
Stencil
-Percent_repeat_item_interface::brew_slash ( Grob *me)
+Percent_repeat_item_interface::brew_slash (Grob *me)
{
Real slope = robust_scm2double (me->get_property ("slope"), 1);
Real wid = 2.0 / slope;
/*
todo: check out if in staff-rule thickness normally.
- */
+ */
Real thick = robust_scm2double (me->get_property ("thickness"), 1);
Stencil m = Lookup::repeat_slash (wid, slope, thick);
m.translate_axis (-m.extent (Y_AXIS).center (), Y_AXIS);
@@ -31,24 +30,24 @@ Percent_repeat_item_interface::brew_slash ( Grob *me)
/*
todo: use grob props for dot_neg_kern, slash_neg_kern?
- */
+*/
Stencil
Percent_repeat_item_interface::x_percent (Grob *me, int count,
Real dot_neg_kern,
Real slash_neg_kern)
{
- Stencil m ;
+ Stencil m;
Stencil s = brew_slash (me);
- for (int i = count; i--;)
+ for (int i = count; i--;)
{
m.add_at_edge (X_AXIS, RIGHT, s, -slash_neg_kern, 0);
}
Stencil d1 = Font_interface::get_default_font (me)->find_by_name ("dots.dot");
- Stencil d2 = d1;
- d1.translate_axis (0.5, Y_AXIS );
+ Stencil d2 = d1;
+ d1.translate_axis (0.5, Y_AXIS);
d2.translate_axis (-0.5, Y_AXIS);
-
+
m.add_at_edge (X_AXIS, LEFT, d1, -dot_neg_kern, 0);
m.add_at_edge (X_AXIS, RIGHT, d2, -dot_neg_kern, 0);
@@ -76,8 +75,6 @@ Percent_repeat_item_interface::beat_slash (SCM grob)
}
ADD_INTERFACE (Percent_repeat_item_interface, "percent-repeat-interface",
- "Repeats that look like percent signs",
- "slope thickness");
-
-
+ "Repeats that look like percent signs",
+ "slope thickness");