[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch for the beam handling
From: |
Mats Bengtsson |
Subject: |
Patch for the beam handling |
Date: |
Fri, 12 Jul 2002 10:51:37 +0200 |
Hi,
I fixed a couple of bugs in beam.cc.
Still, I think things are done the wrong order. If the
positions property is set, that information should be used
already when determining auto knees, stem directions and so on.
I don't dare try to change it since the code is fairly involved
as it is.
/Mats
Generated by (address unknown),
>From = lilypond-1.5.66.mb1, To = lilypond-1.5.66.mb2
usage
cd lilypond-source-dir; patch -E -p1 < lilypond-1.5.66.mb1-1.5.66.mb2.diff
Patches do not contain automatically generated files
or (urg) empty directories,
i.e., you should rerun autoconf, configure
diff -purN ../lilypond-1.5.66.mb1/ChangeLog ./ChangeLog
--- ../lilypond-1.5.66.mb1/ChangeLog Tue Jul 9 23:21:24 2002
+++ ./ChangeLog Fri Jul 12 08:14:11 2002
@@ -1,3 +1,10 @@
+2002-07-12 Mats Bengtsson <address@hidden>
+
+ * lily/beam.cc (after_line_breaking): Set correct stem lengths
+ also when beam positions are set manually.
+ (consider_auto_knees): Don't use automatic knees if the directions
+ are set manually by the user.
+
2002-07-09 Mats Bengtsson <address@hidden>
* flower/source-file.cc: Fix compatibility with older g++.
diff -purN ../lilypond-1.5.66.mb1/VERSION ./VERSION
--- ../lilypond-1.5.66.mb1/VERSION Tue Jul 9 23:21:49 2002
+++ ./VERSION Fri Jul 12 07:33:48 2002
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=66
-MY_PATCH_LEVEL=mb1
+MY_PATCH_LEVEL=mb2
# Use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
diff -purN ../lilypond-1.5.66.mb1/lily/beam.cc ./lily/beam.cc
--- ../lilypond-1.5.66.mb1/lily/beam.cc Sat Jun 8 03:19:32 2002
+++ ./lily/beam.cc Fri Jul 12 10:42:36 2002
@@ -22,6 +22,7 @@
* Use Number_pair i.s.o Interval to represent (yl, yr).
+ * Determine auto knees based on positions if it's set by the user.
*/
@@ -295,9 +296,10 @@ Beam::consider_auto_knees (Grob *me, Dir
{
for (int i=0; i < stems.size (); i++)
{
- if (Stem::invisible_b (stems[i]))
- continue;
Item *s = stems[i];
+ if (Stem::invisible_b (s) ||
+ s->get_grob_property ("dir-forced") == SCM_BOOL_T)
+ continue;
Real y = Stem::extremal_heads (stems[i])[d]
->relative_coordinate (common, Y_AXIS);
@@ -360,13 +362,14 @@ Beam::after_line_breaking (SCM smob)
SCM s = ly_deep_copy (me->get_grob_property ("positions"));
me->set_grob_property ("positions", s);
- if (ly_car (s) != SCM_BOOL_F)
- return SCM_UNSPECIFIED;
+ if (ly_car (s) == SCM_BOOL_F)
+ {
- // one wonders if such genericity is necessary --hwn.
- SCM callbacks = me->get_grob_property ("position-callbacks");
- for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
- gh_call1 (ly_car (i), smob);
+ // one wonders if such genericity is necessary --hwn.
+ SCM callbacks = me->get_grob_property ("position-callbacks");
+ for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
+ gh_call1 (ly_car (i), smob);
+ }
set_stem_lengths (me);
return SCM_UNSPECIFIED;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch for the beam handling,
Mats Bengtsson <=