CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/10/07 10:43:36
Modified files:
. : ChangeLog
lily : beam.cc beaming-info.cc
lily/include : beam.hh beaming.hh
scm : define-grobs.scm
Added files:
lily : enclosing-bracket.cc
Log message:
* lily/beam.cc (set_beaming): don't clip edges.
(connect_beams): don't clip edges.
* lily/beaming-info.cc (clip_edges): new function.
* lily/enclosing-bracket.cc (struct Enclosing_bracket): new file.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4160&tr2=1.4161&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/enclosing-bracket.cc?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/beam.cc.diff?tr1=1.314&tr2=1.315&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/beaming-info.cc.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/beam.hh.diff?tr1=1.103&tr2=1.104&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/include/beaming.hh.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-grobs.scm.diff?tr1=1.241&tr2=1.242&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4160 lilypond/ChangeLog:1.4161
--- lilypond/ChangeLog:1.4160 Fri Oct 7 09:50:21 2005
+++ lilypond/ChangeLog Fri Oct 7 10:43:35 2005
@@ -1,5 +1,10 @@
2005-10-07 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * lily/beam.cc (set_beaming): don't clip edges.
+ (connect_beams): don't clip edges.
+
+ * lily/beaming-info.cc (clip_edges): new function.
+
* lily/enclosing-bracket.cc (struct Enclosing_bracket): new file.
* Documentation/user/instrument-notation.itely (Figured bass):
Index: lilypond/lily/beam.cc
diff -u lilypond/lily/beam.cc:1.314 lilypond/lily/beam.cc:1.315
--- lilypond/lily/beam.cc:1.314 Tue Sep 27 11:33:27 2005
+++ lilypond/lily/beam.cc Fri Oct 7 10:43:36 2005
@@ -217,7 +217,9 @@
Slice last_int;
last_int.set_empty ();
- SCM last_beaming = SCM_EOL;
+
+ // SCM last_beaming = SCM_EOL;
+ SCM last_beaming = scm_cons (SCM_EOL, scm_list_1 (scm_from_int (0)));
Direction last_dir = CENTER;
for (int i = 0; i < stems.size (); i++)
{
@@ -229,15 +231,13 @@
{
int start_point = position_with_maximal_common_beams
(last_beaming, this_beaming,
- last_dir, this_dir);
+ last_dir ? last_dir : this_dir,
+ this_dir);
Direction d = LEFT;
Slice new_slice;
do
{
- if (d == RIGHT && i == stems.size () - 1)
- continue;
-
new_slice.set_empty ();
SCM s = index_get_cell (this_beaming, d);
for (; scm_is_pair (s); s = scm_cdr (s))
@@ -256,7 +256,6 @@
}
else
{
- scm_set_car_x (this_beaming, SCM_EOL);
SCM s = scm_cdr (this_beaming);
for (; scm_is_pair (s); s = scm_cdr (s))
{
@@ -265,10 +264,7 @@
last_int.add_point (np);
}
}
-
- if (i == stems.size () -1)
- scm_set_cdr_x (this_beaming, SCM_EOL);
-
+
if (scm_ilength (scm_cdr (this_beaming)) > 0)
{
last_beaming = this_beaming;
@@ -444,16 +440,22 @@
if (i > 0)
rw = min (nw_f, ((xposn - last_xposn) / 2));
else
- rw = xposn - me->get_bound (LEFT)->extent (xcommon, X_AXIS)[RIGHT]
- + break_overshoot[LEFT];
-
+ {
+ if (me->get_bound (LEFT)->break_status_dir ())
+ rw = xposn - me->get_bound (LEFT)->extent (xcommon,
X_AXIS)[RIGHT]
+ + break_overshoot[LEFT];
+ else
+ rw = 1.0; // ugh.
+ }
+
if (stem)
lw = min (nw_f, ((xposn - last_xposn) / 2));
else
- lw = me->get_bound (RIGHT)->relative_coordinate (xcommon, X_AXIS)
- - last_xposn
- + break_overshoot[RIGHT];
-
+ {
+ lw = me->get_bound (RIGHT)->relative_coordinate (xcommon, X_AXIS)
+ - last_xposn
+ + break_overshoot[RIGHT];
+ }
rw += stem_width / 2;
lw += last_stem_width / 2;
@@ -1160,7 +1162,7 @@
}
void
-Beam::set_beaming (Grob *me, Beaming_info_list *beaming)
+Beam::set_beaming (Grob *me, Beaming_info_list const *beaming)
{
extract_grob_set (me, "stems", stems);
@@ -1173,11 +1175,6 @@
do
{
- /* Don't set beaming for outside of outer stems */
- if ((d == LEFT && i == 0)
- || (d == RIGHT && i == stems.size () -1))
- continue;
-
Grob *stem = stems[i];
SCM beaming_prop = stem->get_property ("beaming");
if (beaming_prop == SCM_EOL
Index: lilypond/lily/beaming-info.cc
diff -u lilypond/lily/beaming-info.cc:1.22 lilypond/lily/beaming-info.cc:1.23
--- lilypond/lily/beaming-info.cc:1.22 Sat Aug 13 21:35:23 2005
+++ lilypond/lily/beaming-info.cc Fri Oct 7 10:43:36 2005
@@ -91,10 +91,22 @@
infos_ = splits[LEFT].infos_;
infos_.concat (splits[RIGHT].infos_);
+
+ clip_edges ();
}
void
Beaming_info_list::add_stem (Moment m, int b)
{
infos_.push (Beaming_info (m, b));
+}
+
+void
+Beaming_info_list::clip_edges ()
+{
+ if (infos_.size ())
+ {
+ infos_[0].beams_i_drul_[LEFT] = 0;
+ infos_.top().beams_i_drul_[RIGHT] = 0;
+ }
}
Index: lilypond/lily/include/beam.hh
diff -u lilypond/lily/include/beam.hh:1.103 lilypond/lily/include/beam.hh:1.104
--- lilypond/lily/include/beam.hh:1.103 Fri Aug 12 00:04:45 2005
+++ lilypond/lily/include/beam.hh Fri Oct 7 10:43:36 2005
@@ -48,7 +48,7 @@
static bool has_interface (Grob *);
static void add_stem (Grob *, Grob *);
static bool is_knee (Grob *);
- static void set_beaming (Grob *, Beaming_info_list *);
+ static void set_beaming (Grob *, Beaming_info_list const *);
static void set_stemlens (Grob *);
static int get_beam_count (Grob *me);
static void position_beam (Grob *me);
Index: lilypond/lily/include/beaming.hh
diff -u lilypond/lily/include/beaming.hh:1.13
lilypond/lily/include/beaming.hh:1.14
--- lilypond/lily/include/beaming.hh:1.13 Thu Mar 10 14:36:12 2005
+++ lilypond/lily/include/beaming.hh Fri Oct 7 10:43:36 2005
@@ -34,6 +34,7 @@
int best_splitpoint_index (Moment &beat_length, bool subdivide) const;
void beamify (Moment &beat_length, bool subdivide);
void add_stem (Moment d, int beams);
+ void clip_edges ();
};
#endif /* BEAMING_HH */
Index: lilypond/scm/define-grobs.scm
diff -u lilypond/scm/define-grobs.scm:1.241 lilypond/scm/define-grobs.scm:1.242
--- lilypond/scm/define-grobs.scm:1.241 Fri Oct 7 09:50:22 2005
+++ lilypond/scm/define-grobs.scm Fri Oct 7 10:43:36 2005
@@ -218,7 +218,7 @@
. ((print-function . ,Enclosing_bracket::print)
(edge-height . (0.2 . 0.2))
(meta . ((class . Item)
- (interfaces . (figured-bass-bracket-interface)) ))
+ (interfaces . (enclosing-bracket-interface)) ))
))
(BassFigureContinuation
. (
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs