(heighten_skyline): new function
* lily/accidental-placement.cc (position_accidentals)
(position_accidentals): fix todo.
+2003-09-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/skyline.cc (merge_skyline): new function
+ (heighten_skyline): new function
+
+ * lily/accidental-placement.cc (position_accidentals)
+ (position_accidentals): fix todo.
+
2003-09-28 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2003-09-28 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * input/test/+.ly (texidoc): put version number inline.
+
+ * GNUmakefile.in: remove rsync-web target.
+
+ * input/regression/bar-scripts.ly (onestaff): raggedright
+
+v/pri2003-09-28 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
* lily/*.cc: remove #if 0'd code in couple of places.
* lily/midi-stream.cc (operator <<): rewrite.
* lily/*.cc: remove #if 0'd code in couple of places.
* lily/midi-stream.cc (operator <<): rewrite.
-# maybe move into private script?
-rsync-web:
- cd out-www && mkdir web && tar -xzf web.tar.gz -C web
- cd out-www/web && \
- chgrp -R lilypond . && \
- chmod -R g+w . && \
- chmod 2775 `find -type d` . && \
- rsync --delete --stats --progress -gorltvu -e ssh . x:/var/www/lilypond/doc/v$(MAJOR_VERSION).$(MINOR_VERSION)/
- cd out-www && rm -rf web/
-texidoc = "
-@section Introduction
-This document presents a brief overview of LilyPond features. When the
+#(string-append "@section Introduction
+
+This document presents a feature test for
+LilyPond " (lilypond-version) ". When the
text correspond with the shown notation, we consider LilyPond Officially
BugFree (tm). This document is intended for finding bugs, and
documenting bugfixes.
TODO: order of tests (file names!), test only one feature per test.
Smaller and neater tests.
text correspond with the shown notation, we consider LilyPond Officially
BugFree (tm). This document is intended for finding bugs, and
documenting bugfixes.
TODO: order of tests (file names!), test only one feature per test.
Smaller and neater tests.
-\score { \context Lyrics \notes {
- \property Score.RehearsalMark \set #'self-alignment-X = #LEFT
+\score { \context Lyrics \lyrics { " " }}
-\mark #(ly:export (string-append "(For LilyPond version "
-(lilypond-version) ")"))
-s2
- }
- \paper { indent = 0.0\pt
- raggedright = ##t
- }
-}
- <cis d es fis gis ases bes ces d dis >4
+ <cis d es fis gis ases bes ces d e! >4
<bes'! fis!>
<bes! cis!>
<c! es ges beses>
<bes'! fis!>
<bes! cis!>
<c! es ges beses>
-#(ly:set-option 'old-relative)
\version "1.9.8"
\header{
texidoc="
\version "1.9.8"
\header{
texidoc="
+\paper { raggedright = ##t }
onestaff = \new Staff\notes\relative c'' {
\property Staff.instr = instr
onestaff = \new Staff\notes\relative c'' {
\property Staff.instr = instr
%% other .texi documents too?
\header{
%% other .texi documents too?
\header{
+texidoc = #(string-append "
-This document tests all kinds of features, from simple to advanced,
-that are not really suited for the reference manual, and are not
-needed as a regression test.
-
-Here you may also find dirty tricks, or very the very latest features
-that have not been documented or fully implemented yet.
-
-"
+This document shows all kinds of tips and tricks, from simple to
+advanced. Here you may also find dirty tricks, or very the very
+latest features that have not been documented or fully implemented
+yet.
+This document is for LilyPond version
+" (lilypond-version) ".")
-\score { \context Lyrics \notes {
- \property Score.RehearsalMark \set #'self-alignment-X = #LEFT
-
-\mark #(ly:export (string-append "(For LilyPond version "
-(lilypond-version) ")"))
-s2
- }
- \paper { indent = 0.0\pt
- raggedright = ##t
- }
-}
+\score { \context Lyrics \lyrics { " " } }
/*
TODO: there is a bug in this code. If two accs are on the same
/*
TODO: there is a bug in this code. If two accs are on the same
- Y-position, they share an Ape, and will be pritned in overstrike.
+ Y-position, they share an Ape, and will be printed in overstrike.
*/
Link_array<Accidental_placement_entry> apes;
for (SCM s = accs; gh_pair_p (s); s =gh_cdr (s))
*/
Link_array<Accidental_placement_entry> apes;
for (SCM s = accs; gh_pair_p (s); s =gh_cdr (s))
if (gh_number_p (spad))
padding = gh_scm2double (spad);
if (gh_number_p (spad))
padding = gh_scm2double (spad);
+ Array<Skyline_entry> left_skyline = head_ape->left_skyline_;
- TODO:
-
- There is a bug in this code: the left_skylines should be
- accumulated, otherwise the b will collide with bb in
-
- bb
- b
- n
-
+ Add accs entries right-to-left.
- apes.push (head_ape);
- for (int i= apes.size () -1 ; i-- > 0;)
+ for (int i= apes.size (); i-- > 0;)
- Accidental_placement_entry *ape = apes[i];
- Real d = 0.0;
- int j = i+1;
- do {
- d = - skyline_meshing_distance (ape->right_skyline_,
- apes[j]->left_skyline_);
-
- if (!isinf(d)
- || j + 1 == apes.size())
- break;
-
- j = j+ 1;
- } while (1);
-
- if (isinf(d))
- d = 0.0;
-
- d -= padding;
- ape->offset_ += apes[j]->offset_ + d;
- }
+ Real offset =
+ -skyline_meshing_distance (apes[i]->right_skyline_, left_skyline);
+ if (isinf (offset))
+ offset = (i < apes.size ()) ? apes[i+1]->offset_ : 0.0;
+ else
+ offset -= padding;
+
+ apes[i]->offset_ = offset;
+
+ Array<Skyline_entry> new_left_skyline = apes[i]->left_skyline_;
+ heighten_skyline (&new_left_skyline, apes[i]->offset_);
+ merge_skyline (&new_left_skyline, left_skyline, LEFT);
+ left_skyline = new_left_skyline;
+ }
for (int i = apes.size(); i--;)
{
Accidental_placement_entry* ape = apes[i];
for (int i = apes.size(); i--;)
{
Accidental_placement_entry* ape = apes[i];
boxes.push (bulb);
boxes.push (stem);
}
boxes.push (bulb);
boxes.push (stem);
}
/*
TODO: add support for natural, double flat.
*/
/*
TODO: add support for natural, double flat.
*/
+
+void
+merge_skyline (Array<Skyline_entry> *a1, Array<Skyline_entry> const & a2,
+ Direction);
void insert_extent_into_skyline (Array<Skyline_entry> *line, Box b, Axis line_axis,
Direction d);
Array<Skyline_entry>
extents_to_skyline (Array<Box> const & extents, Axis a, Direction d);
Array<Skyline_entry> empty_skyline (Direction d);
void insert_extent_into_skyline (Array<Skyline_entry> *line, Box b, Axis line_axis,
Direction d);
Array<Skyline_entry>
extents_to_skyline (Array<Box> const & extents, Axis a, Direction d);
Array<Skyline_entry> empty_skyline (Direction d);
+void heighten_skyline (Array<Skyline_entry> *buildings, Real ground);
Real
skyline_meshing_distance (Array<Skyline_entry> const &buildings,
Array<Skyline_entry> const &clouds);
Real
skyline_meshing_distance (Array<Skyline_entry> const &buildings,
Array<Skyline_entry> const &clouds);
+void
+merge_skyline (Array<Skyline_entry> * a1,
+ Array<Skyline_entry> const & a2,
+ Direction dir)
+{
+ for (int i = 0; i < a2.size(); i++)
+ {
+ Box b;
+ b[X_AXIS] = a2[i].width_;
+ b[Y_AXIS][dir] = a2[i].height_;
+ b[Y_AXIS][-dir] = dir * infinity_f ;
+
+ insert_extent_into_skyline (a1, b, X_AXIS, dir);
+ }
+}
+
Array<Skyline_entry>
empty_skyline (Direction d)
Array<Skyline_entry>
empty_skyline (Direction d)
/*
minimum distance that can be achieved between baselines. "Clouds" is
a skyline pointing down.
/*
minimum distance that can be achieved between baselines. "Clouds" is
a skyline pointing down.
+
+void
+heighten_skyline (Array<Skyline_entry> *buildings, Real ground)
+{
+ for (int i = 0; i < buildings->size (); i++)
+ buildings->elem_ref (i).height_ += ground;
+}